salmanmapkar commited on
Commit
ac10ea3
1 Parent(s): c897630

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -144,11 +144,13 @@ def YoutubeTranscribe(URL, retries = 5):
144
  raise gr.Error(f"Unable to get video from {URL}")
145
 
146
  with gr.Blocks() as i:
147
- video = gr.Video()
148
- text = gr.Textbox(label="Youtube Link", placeholder="https://www.youtube.com/watch?v=GECcjrYHH8w")
149
- if not video and not text:
150
- raise gr.Error("Either input url or video (not both)")
151
- output = gr.Textbox("Output")
 
 
152
  btn = gr.Button("Run")
153
  btn.click(fn=YoutubeTranscribe, inputs=text, outputs=output)
154
  i.launch()
 
144
  raise gr.Error(f"Unable to get video from {URL}")
145
 
146
  with gr.Blocks() as i:
147
+ with gr.Column():
148
+ with gr.Row():
149
+ video = gr.Video()
150
+ text = gr.Textbox(label="Youtube Link", placeholder="https://www.youtube.com/watch?v=GECcjrYHH8w")
151
+ if not video and not text:
152
+ raise gr.Error("Either input url or video (not both)")
153
+ output = gr.Textbox(label="Transcribed Text", lines=10)
154
  btn = gr.Button("Run")
155
  btn.click(fn=YoutubeTranscribe, inputs=text, outputs=output)
156
  i.launch()