Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,16 +71,10 @@ def process_srt(file, target_lang):
|
|
| 71 |
# 3. Gradio Interface
|
| 72 |
demo = gr.Interface(
|
| 73 |
fn=process_srt,
|
| 74 |
-
inputs=[
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
],
|
| 78 |
-
outputs=gr.File(label="Download Translated SRT"),
|
| 79 |
-
title="SRT Subtitle Translator",
|
| 80 |
-
description="Translates SRT files using NLLB-200. Optimized for Hugging Face Spaces.",
|
| 81 |
-
show_api=False # Prevents the API-doc crash on newer Gradio versions
|
| 82 |
)
|
| 83 |
|
| 84 |
if __name__ == "__main__":
|
| 85 |
-
demo.launch()
|
| 86 |
-
|
|
|
|
| 71 |
# 3. Gradio Interface
|
| 72 |
demo = gr.Interface(
|
| 73 |
fn=process_srt,
|
| 74 |
+
inputs=[gr.File(), gr.Dropdown(choices=["English", "Spanish", "French"])],
|
| 75 |
+
outputs=gr.File(),
|
| 76 |
+
show_api=False # THIS PREVENTS THE "BOOL IS NOT ITERABLE" CRASH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
)
|
| 78 |
|
| 79 |
if __name__ == "__main__":
|
| 80 |
+
demo.launch()
|
|
|