Update app.py
Browse files
app.py
CHANGED
|
@@ -127,8 +127,8 @@ def play_video(youtube_url):
|
|
| 127 |
return None
|
| 128 |
return create_html_youtube_player(youtube_url)
|
| 129 |
|
| 130 |
-
def oauth_google():
|
| 131 |
-
|
| 132 |
|
| 133 |
AUDIO_EXAMPLES = glob.glob('examples/*.*', recursive=True)
|
| 134 |
YOUTUBE_EXAMPLES = ["https://youtu.be/5vJBhdjvVcE?si=s3NFG_SlVju0Iklg",
|
|
@@ -226,10 +226,11 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 226 |
youtube_player = gr.HTML(render=True)
|
| 227 |
|
| 228 |
with gr.Column(scale=4):
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
|
|
|
| 233 |
|
| 234 |
with gr.Column(scale=1):
|
| 235 |
# Transcribe
|
|
@@ -238,8 +239,6 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 238 |
transcribe_video_button.click(process_video, inputs=youtube_url, outputs=output_tab2)
|
| 239 |
# Play
|
| 240 |
play_video_button.click(play_video, inputs=youtube_url, outputs=youtube_player)
|
| 241 |
-
# Authetification
|
| 242 |
-
oauth_button.click(oauth_google, outputs=youtube_player)
|
| 243 |
with gr.Column(scale=1):
|
| 244 |
Log(log_file, dark=True, xterm_font_size=12, elem_id='mylog')
|
| 245 |
|
|
|
|
| 127 |
return None
|
| 128 |
return create_html_youtube_player(youtube_url)
|
| 129 |
|
| 130 |
+
# def oauth_google():
|
| 131 |
+
# return create_html_oauth()
|
| 132 |
|
| 133 |
AUDIO_EXAMPLES = glob.glob('examples/*.*', recursive=True)
|
| 134 |
YOUTUBE_EXAMPLES = ["https://youtu.be/5vJBhdjvVcE?si=s3NFG_SlVju0Iklg",
|
|
|
|
| 226 |
youtube_player = gr.HTML(render=True)
|
| 227 |
|
| 228 |
with gr.Column(scale=4):
|
| 229 |
+
with gr.Row():
|
| 230 |
+
# Submit button
|
| 231 |
+
transcribe_video_button = gr.Button("Transcribe", variant="primary")
|
| 232 |
+
# Oauth button
|
| 233 |
+
oauth_button = gr.Button("google.com/device", variant="primary", link="https://www.google.com/device")
|
| 234 |
|
| 235 |
with gr.Column(scale=1):
|
| 236 |
# Transcribe
|
|
|
|
| 239 |
transcribe_video_button.click(process_video, inputs=youtube_url, outputs=output_tab2)
|
| 240 |
# Play
|
| 241 |
play_video_button.click(play_video, inputs=youtube_url, outputs=youtube_player)
|
|
|
|
|
|
|
| 242 |
with gr.Column(scale=1):
|
| 243 |
Log(log_file, dark=True, xterm_font_size=12, elem_id='mylog')
|
| 244 |
|