xTHExBEASTx commited on
Commit
b9ed30b
·
verified ·
1 Parent(s): 06b0b8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
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
- gr.File(label="Upload SRT File"),
76
- gr.Dropdown(choices=list(LANG_MAP.keys()), value="English", label="Target Language")
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()