Spaces:
Runtime error
Runtime error
Commit
·
e2cb302
1
Parent(s):
f61e7d8
Update app.py
Browse files
app.py
CHANGED
@@ -147,11 +147,12 @@ with gr.Blocks() as i:
|
|
147 |
with gr.Column():
|
148 |
video = gr.Video()
|
149 |
text = gr.Textbox(label="Youtube Link", placeholder="https://www.youtube.com/watch?v=GECcjrYHH8w")
|
150 |
-
|
151 |
-
raise gr.Error("Either input url or video (not both)")
|
152 |
with gr.Column():
|
153 |
output = gr.Textbox(label="Transcribed Text", lines=10)
|
154 |
-
|
155 |
-
|
|
|
|
|
156 |
i.launch()
|
157 |
# YoutubeTranscribe('https://www.youtube.com/watch?v=GECcjrYHH8w')
|
|
|
147 |
with gr.Column():
|
148 |
video = gr.Video()
|
149 |
text = gr.Textbox(label="Youtube Link", placeholder="https://www.youtube.com/watch?v=GECcjrYHH8w")
|
150 |
+
btn = gr.Button("Run")
|
|
|
151 |
with gr.Column():
|
152 |
output = gr.Textbox(label="Transcribed Text", lines=10)
|
153 |
+
if not video and not text:
|
154 |
+
raise gr.Error("Either input url or video (not both)")
|
155 |
+
else:
|
156 |
+
btn.click(fn=YoutubeTranscribe, inputs=text, outputs=output)
|
157 |
i.launch()
|
158 |
# YoutubeTranscribe('https://www.youtube.com/watch?v=GECcjrYHH8w')
|