Spaces:
Runtime error
Runtime error
Commit ·
341f056
1
Parent(s): b6fecc1
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,10 +37,10 @@ def download_audio(id_video):
|
|
| 37 |
def process_url(input_path):
|
| 38 |
# setup the client
|
| 39 |
audio_file, audio_file, embed_html_all = download_audio(input_path)
|
| 40 |
-
return
|
| 41 |
|
| 42 |
def process_file(input_path):
|
| 43 |
-
return process(input_path, '')
|
| 44 |
|
| 45 |
def process(audio_file, embed_html_all):
|
| 46 |
emb, ts = get_embed(audio_file)
|
|
@@ -49,7 +49,7 @@ def process(audio_file, embed_html_all):
|
|
| 49 |
catalog = get_catalog()
|
| 50 |
_, I = do_search(emb, ind)
|
| 51 |
top1, top2, top3, top4, top5 = get_top(I, ind_filenames, catalog)
|
| 52 |
-
return top1, top2, top3, top4, top5
|
| 53 |
|
| 54 |
|
| 55 |
with gr.Blocks() as demo:
|
|
|
|
| 37 |
def process_url(input_path):
|
| 38 |
# setup the client
|
| 39 |
audio_file, audio_file, embed_html_all = download_audio(input_path)
|
| 40 |
+
return process(audio_file, embed_html_all)
|
| 41 |
|
| 42 |
def process_file(input_path):
|
| 43 |
+
return process(input_path, '')[1:]
|
| 44 |
|
| 45 |
def process(audio_file, embed_html_all):
|
| 46 |
emb, ts = get_embed(audio_file)
|
|
|
|
| 49 |
catalog = get_catalog()
|
| 50 |
_, I = do_search(emb, ind)
|
| 51 |
top1, top2, top3, top4, top5 = get_top(I, ind_filenames, catalog)
|
| 52 |
+
return embed_html_all, top1, top2, top3, top4, top5
|
| 53 |
|
| 54 |
|
| 55 |
with gr.Blocks() as demo:
|