Spaces:
Runtime error
Runtime error
Commit
·
244876a
1
Parent(s):
66408aa
fixed gradio
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def transcribe(inputs, task, return_timestamps, language):
|
|
43 |
|
44 |
# Map the language names to their corresponding codes
|
45 |
language_codes = {"English": "en", "Uzbek": "uz"}
|
46 |
-
language_code = language_codes.get(language, "
|
47 |
result = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"},
|
48 |
return_timestamps=return_timestamps)
|
49 |
|
@@ -181,4 +181,4 @@ yt_transcribe = gr.Interface(
|
|
181 |
with demo:
|
182 |
gr.TabbedInterface([mf_transcribe, file_transcribe, yt_transcribe], ["Microphone", "Audio file", "YouTube"])
|
183 |
|
184 |
-
demo.launch(enable_queue=True)
|
|
|
43 |
|
44 |
# Map the language names to their corresponding codes
|
45 |
language_codes = {"English": "en", "Uzbek": "uz"}
|
46 |
+
language_code = language_codes.get(language, "uz") # Default to "en" if the language is not found
|
47 |
result = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"},
|
48 |
return_timestamps=return_timestamps)
|
49 |
|
|
|
181 |
with demo:
|
182 |
gr.TabbedInterface([mf_transcribe, file_transcribe, yt_transcribe], ["Microphone", "Audio file", "YouTube"])
|
183 |
|
184 |
+
demo.launch(share=True, enable_queue=True)
|