Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def get_matches(text_query):
|
|
47 |
if "youtube.com" in url or "youtu.be" in url:
|
48 |
# Extract video ID from the URL
|
49 |
video_id = url.split("v=")[-1] if "v=" in url else url.split("/")[-1]
|
50 |
-
|
51 |
# Create iframe for YouTube video
|
52 |
output += f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>\n\n'
|
53 |
else:
|
@@ -60,7 +60,7 @@ def get_matches(text_query):
|
|
60 |
with gr.Blocks() as demo:
|
61 |
gr.Markdown("# Music from Vibe")
|
62 |
with gr.Row():
|
63 |
-
text_input = gr.Textbox(label="
|
64 |
output = gr.Markdown(label="Results")
|
65 |
submit_button = gr.Button("Submit")
|
66 |
submit_button.click(fn=get_matches, inputs=text_input, outputs=output)
|
|
|
47 |
if "youtube.com" in url or "youtu.be" in url:
|
48 |
# Extract video ID from the URL
|
49 |
video_id = url.split("v=")[-1] if "v=" in url else url.split("/")[-1]
|
50 |
+
print(f"https://www.youtube.com/embed/{video_id}")
|
51 |
# Create iframe for YouTube video
|
52 |
output += f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>\n\n'
|
53 |
else:
|
|
|
60 |
with gr.Blocks() as demo:
|
61 |
gr.Markdown("# Music from Vibe")
|
62 |
with gr.Row():
|
63 |
+
text_input = gr.Textbox(label="Describe your song")
|
64 |
output = gr.Markdown(label="Results")
|
65 |
submit_button = gr.Button("Submit")
|
66 |
submit_button.click(fn=get_matches, inputs=text_input, outputs=output)
|