Spaces:
Runtime error
Runtime error
Commit
·
649e4e0
1
Parent(s):
5e34099
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
# !pip install youtube-dl
|
2 |
from __future__ import unicode_literals
|
3 |
import youtube_dl
|
4 |
from pydub import AudioSegment
|
@@ -153,23 +152,7 @@ def YoutubeTranscribe(URL, retries = 5):
|
|
153 |
return Transcribe()
|
154 |
else:
|
155 |
raise gr.Error(f"Unable to get video from {URL}")
|
156 |
-
|
157 |
-
# with gr.Blocks() as i:
|
158 |
-
# with gr.Row():
|
159 |
-
# with gr.Column():
|
160 |
-
# with gr.Row():
|
161 |
-
# video = gr.Video()
|
162 |
-
# audio = gr.Audio()
|
163 |
-
# text = gr.Textbox(label="Youtube Link", placeholder="https://www.youtube.com/watch?v=GECcjrYHH8w")
|
164 |
-
# btn = gr.Button("Run")
|
165 |
-
# with gr.Row():
|
166 |
-
# output = gr.Textbox(label="Transcribed Text", lines=15)
|
167 |
-
# if not video and not text:
|
168 |
-
# raise gr.Error("Either input url or video (not both)")
|
169 |
-
# else:
|
170 |
-
# btn.click(fn=YoutubeTranscribe, inputs=text, outputs=output)
|
171 |
-
# i.launch()
|
172 |
-
|
173 |
ut = gr.Interface(
|
174 |
fn=YoutubeTranscribe,
|
175 |
inputs=gr.Textbox(label="Youtube Link", placeholder="https://www.youtube.com/watch?v=GECcjrYHH8w"),
|
|
|
|
|
1 |
from __future__ import unicode_literals
|
2 |
import youtube_dl
|
3 |
from pydub import AudioSegment
|
|
|
152 |
return Transcribe()
|
153 |
else:
|
154 |
raise gr.Error(f"Unable to get video from {URL}")
|
155 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
ut = gr.Interface(
|
157 |
fn=YoutubeTranscribe,
|
158 |
inputs=gr.Textbox(label="Youtube Link", placeholder="https://www.youtube.com/watch?v=GECcjrYHH8w"),
|