Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
18c8c48
1
Parent(s):
6c226f9
Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,7 @@ import pytube as pt
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import model_info
|
7 |
|
8 |
-
MODEL_NAME = "openai/whisper-
|
9 |
-
lang = "en"
|
10 |
|
11 |
device = 0 if torch.cuda.is_available() else "cpu"
|
12 |
|
@@ -17,7 +16,6 @@ pipe = pipeline(
|
|
17 |
device=device,
|
18 |
)
|
19 |
|
20 |
-
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language=lang, task="transcribe")
|
21 |
|
22 |
def transcribe(microphone, file_upload):
|
23 |
warn_output = ""
|
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import model_info
|
7 |
|
8 |
+
MODEL_NAME = "openai/whisper-large-v2"
|
|
|
9 |
|
10 |
device = 0 if torch.cuda.is_available() else "cpu"
|
11 |
|
|
|
16 |
device=device,
|
17 |
)
|
18 |
|
|
|
19 |
|
20 |
def transcribe(microphone, file_upload):
|
21 |
warn_output = ""
|