SPACERUNNER99 commited on
Commit
5b75a0a
·
verified ·
1 Parent(s): a3bd47b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -116,9 +116,9 @@ def generate_subtitle_file(language, segments, input_video_name):
116
  f.close()
117
  return subtitle_file
118
 
119
- def transcribe(url):
120
 
121
- video = download_video(url)
122
  mp3_file, duration = extract_audio(video)
123
  print("transcribe")
124
  wordlevel_info=word_level_transcribe(mp3_file)
@@ -130,7 +130,7 @@ with gr.Blocks() as demo:
130
  gr.Markdown("Start typing below and then click **Run** to see the progress and final output.")
131
  with gr.Column():
132
  #audio_in = gr.Audio(type="filepath")
133
- url = gr.Text()
134
  srt_file = gr.File()
135
  btn = gr.Button("Create")
136
  video_file_output = gr.Video(label="Result Video")
 
116
  f.close()
117
  return subtitle_file
118
 
119
+ def transcribe(video):
120
 
121
+ #video = download_video(url)
122
  mp3_file, duration = extract_audio(video)
123
  print("transcribe")
124
  wordlevel_info=word_level_transcribe(mp3_file)
 
130
  gr.Markdown("Start typing below and then click **Run** to see the progress and final output.")
131
  with gr.Column():
132
  #audio_in = gr.Audio(type="filepath")
133
+ url = gr.File()
134
  srt_file = gr.File()
135
  btn = gr.Button("Create")
136
  video_file_output = gr.Video(label="Result Video")