Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ import pytube as pt
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import model_info
|
7 |
|
8 |
-
MODEL_NAME = "
|
9 |
-
lang = "
|
10 |
|
11 |
device = 0 if torch.cuda.is_available() else "cpu"
|
12 |
pipe = pipeline(
|
@@ -69,8 +69,7 @@ mf_transcribe = gr.Interface(
|
|
69 |
theme="huggingface",
|
70 |
title="Whisper Demo: Transcribe Audio",
|
71 |
description=(
|
72 |
-
"Transcribe long-form microphone or audio inputs with the click of a button!
|
73 |
-
f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and π€ Transformers to transcribe audio files"
|
74 |
" of arbitrary length."
|
75 |
),
|
76 |
allow_flagging="never",
|
@@ -84,8 +83,7 @@ yt_transcribe = gr.Interface(
|
|
84 |
theme="huggingface",
|
85 |
title="Whisper Demo: Transcribe YouTube",
|
86 |
description=(
|
87 |
-
"Transcribe long-form YouTube videos with the click of a button!
|
88 |
-
f" [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and π€ Transformers to transcribe audio files of"
|
89 |
" arbitrary length."
|
90 |
),
|
91 |
allow_flagging="never",
|
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import model_info
|
7 |
|
8 |
+
MODEL_NAME = "openai/whisper-small" #this always needs to stay in line 8 :D sorry for the hackiness
|
9 |
+
lang = "en"
|
10 |
|
11 |
device = 0 if torch.cuda.is_available() else "cpu"
|
12 |
pipe = pipeline(
|
|
|
69 |
theme="huggingface",
|
70 |
title="Whisper Demo: Transcribe Audio",
|
71 |
description=(
|
72 |
+
"Transcribe long-form microphone or audio inputs with the click of a button! and π€ Transformers to transcribe audio files"
|
|
|
73 |
" of arbitrary length."
|
74 |
),
|
75 |
allow_flagging="never",
|
|
|
83 |
theme="huggingface",
|
84 |
title="Whisper Demo: Transcribe YouTube",
|
85 |
description=(
|
86 |
+
"Transcribe long-form YouTube videos with the click of a button! and π€ Transformers to transcribe audio files of"
|
|
|
87 |
" arbitrary length."
|
88 |
),
|
89 |
allow_flagging="never",
|