ChiBenevisamPas commited on
Commit
cb2bbbc
·
verified ·
1 Parent(s): 25fe048
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -187,14 +187,10 @@ def transcribe_video(video_file, video_url, language, target_language, output_fo
187
  iface = gr.Interface(
188
  fn=transcribe_video,
189
  inputs=[
190
- gr.File(label="Upload Video File (or leave empty for YouTube link)", optional=True),
191
  gr.Textbox(label="YouTube Video URL (optional)", placeholder="https://www.youtube.com/watch?v=..."),
192
  gr.Dropdown(label="Select Original Video Language", choices=["en", "es", "fr", "de", "it", "pt"], value="en"),
193
- gr.Dropdown(
194
- label="Select Subtitle Translation Language",
195
- choices=["en", "fa", "es", "fr", "de", "it", "pt", "ar", "zh", "hi", "ja", "ko", "ru"],
196
- value="fa"
197
- ),
198
  gr.Radio(label="Choose Output Format", choices=["SRT", "Video with Hardsub", "Word", "PDF", "PowerPoint"], value="Video with Hardsub")
199
  ],
200
  outputs=gr.File(label="Download File"),
@@ -205,7 +201,10 @@ iface = gr.Interface(
205
  "in various formats including SRT, hardcoded subtitles in video, Word, PDF, or PowerPoint."
206
  ),
207
  theme="compact",
208
- live=False # No live interaction needed
209
  )
210
 
211
- iface.launch()
 
 
 
 
187
  iface = gr.Interface(
188
  fn=transcribe_video,
189
  inputs=[
190
+ gr.File(label="Upload Video File (or leave empty for YouTube link)"), # Removed 'optional=True'
191
  gr.Textbox(label="YouTube Video URL (optional)", placeholder="https://www.youtube.com/watch?v=..."),
192
  gr.Dropdown(label="Select Original Video Language", choices=["en", "es", "fr", "de", "it", "pt"], value="en"),
193
+ gr.Dropdown(label="Select Subtitle Translation Language", choices=["en", "fa", "es", "fr"], value="fa"),
 
 
 
 
194
  gr.Radio(label="Choose Output Format", choices=["SRT", "Video with Hardsub", "Word", "PDF", "PowerPoint"], value="Video with Hardsub")
195
  ],
196
  outputs=gr.File(label="Download File"),
 
201
  "in various formats including SRT, hardcoded subtitles in video, Word, PDF, or PowerPoint."
202
  ),
203
  theme="compact",
204
+ live=False
205
  )
206
 
207
+ if __name__ == "__main__":
208
+ iface.launch()
209
+
210
+