Ubuntu
commited on
Commit
·
3244f42
1
Parent(s):
2628bee
change printing
Browse files
app.py
CHANGED
@@ -96,8 +96,8 @@ def embed_youtube(youtube_url):
|
|
96 |
print(video_id)
|
97 |
embed_html = f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'
|
98 |
return gr.update(value=embed_html, visible=True), "", None
|
99 |
-
except:
|
100 |
-
return gr.update(value="", visible=False), "Invalid YouTube URL", None
|
101 |
return gr.update(value="", visible=False), "", None
|
102 |
|
103 |
def clear_on_audio_input(audio):
|
|
|
96 |
print(video_id)
|
97 |
embed_html = f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'
|
98 |
return gr.update(value=embed_html, visible=True), "", None
|
99 |
+
except Exception as e:
|
100 |
+
return gr.update(value="", visible=False), f"Invalid YouTube URL: {str(e)}", None
|
101 |
return gr.update(value="", visible=False), "", None
|
102 |
|
103 |
def clear_on_audio_input(audio):
|