palbha commited on
Commit
433d4b6
·
verified ·
1 Parent(s): 47f8801

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1,6 +1,12 @@
1
  import gradio as gr
2
  import torch
3
  from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, TextStreamer, AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
 
 
 
 
 
 
4
 
5
  # Whisper Model Optimization
6
  model = "openai/whisper-small"
 
1
  import gradio as gr
2
  import torch
3
  from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, TextStreamer, AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
4
+ from huggingface_hub import login
5
+ import os
6
+
7
+ # Use the secret stored in the Hugging Face space
8
+ token = os.getenv("HF_TOKEN")
9
+ login(token=token)
10
 
11
  # Whisper Model Optimization
12
  model = "openai/whisper-small"