Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -38,10 +38,10 @@ def get_matches(text_query):
|
|
38 |
matches = compare_text_to_audio_embeddings(text_query, "audio_embeddings_v3.pkl")
|
39 |
|
40 |
# Format the output
|
41 |
-
output = f"<h2>Top
|
42 |
|
43 |
for filename, url, similarity in matches[:3]:
|
44 |
-
output += f"{similarity:.4f}\n"
|
45 |
|
46 |
# Check if the URL is a YouTube URL
|
47 |
if "youtube.com" in url or "youtu.be" in url:
|
@@ -62,7 +62,7 @@ def get_matches(text_query):
|
|
62 |
with gr.Blocks() as demo:
|
63 |
gr.Markdown("# Music from Vibe")
|
64 |
with gr.Row():
|
65 |
-
text_input = gr.Textbox(label="Describe
|
66 |
output = gr.Markdown(label="Results")
|
67 |
submit_button = gr.Button("Submit")
|
68 |
submit_button.click(fn=get_matches, inputs=text_input, outputs=output)
|
|
|
38 |
matches = compare_text_to_audio_embeddings(text_query, "audio_embeddings_v3.pkl")
|
39 |
|
40 |
# Format the output
|
41 |
+
output = f"<h2>Top 3 matches for '{text_query}'</h2>\n\n"
|
42 |
|
43 |
for filename, url, similarity in matches[:3]:
|
44 |
+
#output += f"{similarity:.4f}\n"
|
45 |
|
46 |
# Check if the URL is a YouTube URL
|
47 |
if "youtube.com" in url or "youtu.be" in url:
|
|
|
62 |
with gr.Blocks() as demo:
|
63 |
gr.Markdown("# Music from Vibe")
|
64 |
with gr.Row():
|
65 |
+
text_input = gr.Textbox(label="Describe what you want to hear")
|
66 |
output = gr.Markdown(label="Results")
|
67 |
submit_button = gr.Button("Submit")
|
68 |
submit_button.click(fn=get_matches, inputs=text_input, outputs=output)
|