Spaces:
Runtime error
Runtime error
Commit
·
ac10ea3
1
Parent(s):
c897630
Update app.py
Browse files
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 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
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()
|