Update app.py
Browse files
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"
|