Suprath commited on
Commit
02331a0
·
verified ·
1 Parent(s): 9ef675b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -145,7 +145,6 @@ def predict(process_video):
145
 
146
  return hypo, "transcript.xml"
147
 
148
-
149
  # ---- Gradio Layout -----
150
  youtube_url_in = gr.Textbox(label="Youtube url", lines=1, interactive=True)
151
  video_in = gr.Video(label="Input Video", mirror_webcam=False, interactive=True)
@@ -200,11 +199,14 @@ with demo:
200
  video_out])
201
  predict_btn = gr.Button("Predict")
202
  predict_btn.click(predict, [video_out], [
203
- text_output, xml_output])
 
 
 
 
 
204
  with gr.Row():
205
- # video_lip = gr.Video(label="Audio Visual Video", mirror_webcam=False)
206
  text_output.render()
 
207
 
208
-
209
-
210
- demo.launch(debug=True)
 
145
 
146
  return hypo, "transcript.xml"
147
 
 
148
  # ---- Gradio Layout -----
149
  youtube_url_in = gr.Textbox(label="Youtube url", lines=1, interactive=True)
150
  video_in = gr.Video(label="Input Video", mirror_webcam=False, interactive=True)
 
199
  video_out])
200
  predict_btn = gr.Button("Predict")
201
  predict_btn.click(predict, [video_out], [
202
+ text_output])
203
+
204
+ # Download XML button
205
+ download_xml_btn = gr.Button("Download XML")
206
+ download_xml_btn.click(lambda: xml_output.download("transcript.xml"))
207
+
208
  with gr.Row():
 
209
  text_output.render()
210
+ xml_output.render()
211
 
212
+ demo.launch(debug=True)