Spaces:
Runtime error
Runtime error
sanchit-gandhi
commited on
Commit
·
99975a5
1
Parent(s):
bf72a19
Update app.py
Browse files
app.py
CHANGED
@@ -4,16 +4,18 @@ import os
|
|
4 |
import gradio as gr
|
5 |
import pytube as pt
|
6 |
from speechbox import ASRDiarizationPipeline
|
|
|
7 |
|
8 |
MODEL_NAME = "openai/whisper-small"
|
9 |
|
10 |
device = 0 if torch.cuda.is_available() else "cpu"
|
11 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
12 |
|
|
|
|
|
13 |
pipe = ASRDiarizationPipeline.from_pretrained(
|
14 |
asr_model=MODEL_NAME,
|
15 |
device=device,
|
16 |
-
use_auth_token=HF_TOKEN,
|
17 |
)
|
18 |
|
19 |
def tuple_to_string(start_end_tuple, ndigits=1):
|
|
|
4 |
import gradio as gr
|
5 |
import pytube as pt
|
6 |
from speechbox import ASRDiarizationPipeline
|
7 |
+
from huggingface_hub import login
|
8 |
|
9 |
MODEL_NAME = "openai/whisper-small"
|
10 |
|
11 |
device = 0 if torch.cuda.is_available() else "cpu"
|
12 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
13 |
|
14 |
+
login(HF_TOKEN)
|
15 |
+
|
16 |
pipe = ASRDiarizationPipeline.from_pretrained(
|
17 |
asr_model=MODEL_NAME,
|
18 |
device=device,
|
|
|
19 |
)
|
20 |
|
21 |
def tuple_to_string(start_end_tuple, ndigits=1):
|