SPACERUNNER99 commited on
Commit
53cb608
·
verified ·
1 Parent(s): 2be14b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -123,7 +123,7 @@ def transcribe(url):
123
  wordlevel_info=word_level_transcribe(mp3_file)
124
  subtitles = create_subtitles(wordlevel_info)
125
  subtitle_file = generate_subtitle_file('fa', subtitles, 'video_subtitled')
126
- return subtitle_file, video
127
 
128
  with gr.Blocks() as demo:
129
  gr.Markdown("Start typing below and then click **Run** to see the progress and final output.")
@@ -133,10 +133,11 @@ with gr.Blocks() as demo:
133
  srt_file = gr.File()
134
  btn = gr.Button("Create")
135
  video_file_output = gr.Video(label="Result Video")
 
136
  btn.click(
137
  fn=transcribe,
138
  inputs=url,
139
- outputs=[srt_file, video_file_output],
140
  )
141
 
142
  demo.launch(debug=True)
 
123
  wordlevel_info=word_level_transcribe(mp3_file)
124
  subtitles = create_subtitles(wordlevel_info)
125
  subtitle_file = generate_subtitle_file('fa', subtitles, 'video_subtitled')
126
+ return subtitle_file, video, mp3_file
127
 
128
  with gr.Blocks() as demo:
129
  gr.Markdown("Start typing below and then click **Run** to see the progress and final output.")
 
133
  srt_file = gr.File()
134
  btn = gr.Button("Create")
135
  video_file_output = gr.Video(label="Result Video")
136
+ mp3_file = gr.Audio(type="file_path")
137
  btn.click(
138
  fn=transcribe,
139
  inputs=url,
140
+ outputs=[srt_file, video_file_output, mp3_file],
141
  )
142
 
143
  demo.launch(debug=True)