Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -139,11 +139,14 @@ def play_video(youtube_url):
|
|
| 139 |
|
| 140 |
AUDIO_EXAMPLES = glob.glob('examples/*.*', recursive=True)
|
| 141 |
YOUTUBE_EXAMPLES = ["https://youtu.be/5vJBhdjvVcE?si=s3NFG_SlVju0Iklg",
|
| 142 |
-
"https://www.youtube.com/watch?v=
|
| 143 |
-
"https://youtu.be/
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
theme = gr.Theme.from_hub("gradio/dracula_revamped")
|
| 149 |
theme.text_md = '10px'
|
|
@@ -196,7 +199,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 196 |
## Caution:
|
| 197 |
- For acadmic reproduction purpose, we strongly recommend to use [Colab Demo](https://colab.research.google.com/drive/1AgOVEBfZknDkjmSRA7leoa81a2vrnhBG?usp=sharing) with multiple checkpoints.
|
| 198 |
|
| 199 |
-
## YouTube transcription (Sorry!!
|
| 200 |
- Press the `Transcribe` button, copy the 12-digit code below, and paste it into `google.com/device`. (Only needed once.)
|
| 201 |
|
| 202 |
<div style="display: inline-block;">
|
|
@@ -252,7 +255,8 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 252 |
# Transcribe
|
| 253 |
output_tab2 = gr.HTML(render=True)
|
| 254 |
# video_output = gr.Text(label="Video Info")
|
| 255 |
-
transcribe_video_button.click(
|
|
|
|
| 256 |
# Play
|
| 257 |
play_video_button.click(play_video, inputs=youtube_url, outputs=youtube_player)
|
| 258 |
with gr.Column(scale=1):
|
|
|
|
| 139 |
|
| 140 |
AUDIO_EXAMPLES = glob.glob('examples/*.*', recursive=True)
|
| 141 |
YOUTUBE_EXAMPLES = ["https://youtu.be/5vJBhdjvVcE?si=s3NFG_SlVju0Iklg",
|
| 142 |
+
"https://www.youtube.com/watch?v=bnS-HK_lTHA",
|
| 143 |
+
"https://youtu.be/OXXRoa1U6xU?si=dpYMun4LjZHNydSb"]
|
| 144 |
+
# YOUTUBE_EXAMPLES = ["https://youtu.be/5vJBhdjvVcE?si=s3NFG_SlVju0Iklg",
|
| 145 |
+
# "https://www.youtube.com/watch?v=vMboypSkj3c",
|
| 146 |
+
# "https://youtu.be/vRd5KEjX8vw?si=b-qw633ZjaX6Uxy5",
|
| 147 |
+
# "https://youtu.be/bnS-HK_lTHA?si=PQLVAab3QHMbv0S3https://youtu.be/zJB0nnOc7bM?si=EA1DN8nHWJcpQWp_",
|
| 148 |
+
# "https://youtu.be/7mjQooXt28o?si=qqmMxCxwqBlLPDI2",
|
| 149 |
+
# "https://youtu.be/mIWYTg55h10?si=WkbtKfL6NlNquvT8"]
|
| 150 |
|
| 151 |
theme = gr.Theme.from_hub("gradio/dracula_revamped")
|
| 152 |
theme.text_md = '10px'
|
|
|
|
| 199 |
## Caution:
|
| 200 |
- For acadmic reproduction purpose, we strongly recommend to use [Colab Demo](https://colab.research.google.com/drive/1AgOVEBfZknDkjmSRA7leoa81a2vrnhBG?usp=sharing) with multiple checkpoints.
|
| 201 |
|
| 202 |
+
## YouTube transcription (Sorry!! YouTube blocked HuggingFace IP. We display a few pre-transcribed examples in the below!):
|
| 203 |
- Press the `Transcribe` button, copy the 12-digit code below, and paste it into `google.com/device`. (Only needed once.)
|
| 204 |
|
| 205 |
<div style="display: inline-block;">
|
|
|
|
| 255 |
# Transcribe
|
| 256 |
output_tab2 = gr.HTML(render=True)
|
| 257 |
# video_output = gr.Text(label="Video Info")
|
| 258 |
+
transcribe_video_button.click(process_audio_yt_temp, inputs=youtube_url, outputs=output_tab2)
|
| 259 |
+
# transcribe_video_button.click(process_video, inputs=youtube_url, outputs=output_tab2)
|
| 260 |
# Play
|
| 261 |
play_video_button.click(play_video, inputs=youtube_url, outputs=youtube_player)
|
| 262 |
with gr.Column(scale=1):
|