Spaces:
Runtime error
Runtime error
Commit
·
c8f1cbb
1
Parent(s):
ac10ea3
Update app.py
Browse files
app.py
CHANGED
@@ -145,11 +145,11 @@ def YoutubeTranscribe(URL, retries = 5):
|
|
145 |
|
146 |
with gr.Blocks() as i:
|
147 |
with gr.Column():
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
output = gr.Textbox(label="Transcribed Text", lines=10)
|
154 |
btn = gr.Button("Run")
|
155 |
btn.click(fn=YoutubeTranscribe, inputs=text, outputs=output)
|
|
|
145 |
|
146 |
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 |
+
if not video and not text:
|
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 |
btn = gr.Button("Run")
|
155 |
btn.click(fn=YoutubeTranscribe, inputs=text, outputs=output)
|