Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,7 @@ class UI:
|
|
67 |
model_cache[selectedModel] = model
|
68 |
|
69 |
# Callable for processing an audio file
|
70 |
-
whisperCallable = lambda audio : model.transcribe(audio, language=selectedLanguage, task=task)
|
71 |
|
72 |
# The results
|
73 |
if (vad == 'silero-vad'):
|
@@ -189,13 +189,13 @@ def createUi(inputAudioMaxDuration, share=False, server_name: str = None):
|
|
189 |
ui_article = "Read the [documentation her](https://huggingface.co/spaces/aadnk/whisper-webui/blob/main/docs/options.md)"
|
190 |
|
191 |
demo = gr.Interface(fn=ui.transcribeFile, description=ui_description, article=ui_article, inputs=[
|
192 |
-
gr.Dropdown(choices=["tiny", "base", "small", "medium", "large"], value="
|
193 |
gr.Dropdown(choices=sorted(LANGUAGES), label="Language", value="Chinese"),
|
194 |
gr.Text(label="URL (YouTube, etc.)"),
|
195 |
gr.Audio(source="upload", type="filepath", label="Upload Audio"),
|
196 |
gr.Audio(source="microphone", type="filepath", label="Microphone Input"),
|
197 |
gr.Dropdown(choices=["transcribe", "translate"], label="Task", value="transcribe"),
|
198 |
-
gr.Dropdown(choices=["none", "silero-vad", "silero-vad-skip-gaps", "periodic-vad"], label="VAD"
|
199 |
gr.Number(label="VAD - Merge Window (s)", precision=0, value=5),
|
200 |
gr.Number(label="VAD - Max Merge Size (s)", precision=0, value=150)
|
201 |
], outputs=[
|
@@ -204,7 +204,7 @@ def createUi(inputAudioMaxDuration, share=False, server_name: str = None):
|
|
204 |
gr.Text(label="Segments")
|
205 |
])
|
206 |
|
207 |
-
demo.launch(share=
|
208 |
|
209 |
if __name__ == '__main__':
|
210 |
createUi(DEFAULT_INPUT_AUDIO_MAX_DURATION)
|
|
|
67 |
model_cache[selectedModel] = model
|
68 |
|
69 |
# Callable for processing an audio file
|
70 |
+
whisperCallable = lambda audio : model.transcribe(audio, language=selectedLanguage, task=task, fp16 = False)
|
71 |
|
72 |
# The results
|
73 |
if (vad == 'silero-vad'):
|
|
|
189 |
ui_article = "Read the [documentation her](https://huggingface.co/spaces/aadnk/whisper-webui/blob/main/docs/options.md)"
|
190 |
|
191 |
demo = gr.Interface(fn=ui.transcribeFile, description=ui_description, article=ui_article, inputs=[
|
192 |
+
gr.Dropdown(choices=["tiny", "base", "small", "medium", "large"], value="small", label="Model"),
|
193 |
gr.Dropdown(choices=sorted(LANGUAGES), label="Language", value="Chinese"),
|
194 |
gr.Text(label="URL (YouTube, etc.)"),
|
195 |
gr.Audio(source="upload", type="filepath", label="Upload Audio"),
|
196 |
gr.Audio(source="microphone", type="filepath", label="Microphone Input"),
|
197 |
gr.Dropdown(choices=["transcribe", "translate"], label="Task", value="transcribe"),
|
198 |
+
gr.Dropdown(choices=["none", "silero-vad", "silero-vad-skip-gaps", "periodic-vad"], label="VAD"),
|
199 |
gr.Number(label="VAD - Merge Window (s)", precision=0, value=5),
|
200 |
gr.Number(label="VAD - Max Merge Size (s)", precision=0, value=150)
|
201 |
], outputs=[
|
|
|
204 |
gr.Text(label="Segments")
|
205 |
])
|
206 |
|
207 |
+
demo.launch(share=share, server_name=server_name)
|
208 |
|
209 |
if __name__ == '__main__':
|
210 |
createUi(DEFAULT_INPUT_AUDIO_MAX_DURATION)
|