Spaces:
Runtime error
Runtime error
Update app.py
#2
by
YanzBotz
- opened
app.py
CHANGED
@@ -36,7 +36,7 @@ def transcribe(inputs, task, language, return_timestamps):
|
|
36 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
37 |
|
38 |
# Map the language names to their corresponding codes
|
39 |
-
language_codes = {"English": "en", "Korean": "ko", "Japanese": "ja"}
|
40 |
language_code = language_codes.get(language, "en") # Default to "en" if the language is not found
|
41 |
result = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"}, return_timestamps=return_timestamps)
|
42 |
|
|
|
36 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
37 |
|
38 |
# Map the language names to their corresponding codes
|
39 |
+
language_codes = {"English": "en", "Indonesia": "id", "Korean": "ko", "Japanese": "ja"}
|
40 |
language_code = language_codes.get(language, "en") # Default to "en" if the language is not found
|
41 |
result = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"}, return_timestamps=return_timestamps)
|
42 |
|