Update app.py
Browse files
app.py
CHANGED
@@ -178,7 +178,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
178 |
def update_video_embed(youtube_url):
|
179 |
if youtube_url:
|
180 |
try:
|
181 |
-
video_id =
|
182 |
return f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'
|
183 |
except Exception as e:
|
184 |
print(f"Error embedding video: {e}")
|
|
|
178 |
def update_video_embed(youtube_url):
|
179 |
if youtube_url:
|
180 |
try:
|
181 |
+
video_id = fetch_youtube_id(youtube_url)
|
182 |
return f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'
|
183 |
except Exception as e:
|
184 |
print(f"Error embedding video: {e}")
|