PierreHanna commited on
Commit
2936031
1 Parent(s): ea76784

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,7 +42,7 @@ def process_url(input_path):
42
  audio_file, audio_file, embed_html_all = download_audio(input_path)
43
  return process(audio_file, embed_html_all)
44
  except:
45
- return "", "Erreur Input", "", "", "", "", "", "", "", "", "", ""
46
 
47
  def process_file(input_path):
48
  return process(input_path, '')[1:]
@@ -57,9 +57,9 @@ def process(audio_file, embed_html_all):
57
 
58
  _, I = do_search(emb, ind)
59
  top1, top2, top3, top4, top5, top6, top7, top8, top9, top10 = get_top(I, ind_filenames, url_dict, catalog)
60
- return embed_html_all, ind_filenames[I[0][0]].split('.')[0], top1, top2, top3, top4, top5, top6, top7, top8, top9, top10
61
  except:
62
- return embed_html_all, "Erreur Input", "", "", "", "", "", "", "", "", "", ""
63
 
64
  poc_examples = [["https://www.youtube.com/watch?v=aNzCDt2eidg"]]
65
 
 
42
  audio_file, audio_file, embed_html_all = download_audio(input_path)
43
  return process(audio_file, embed_html_all)
44
  except:
45
+ return "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", ""
46
 
47
  def process_file(input_path):
48
  return process(input_path, '')[1:]
 
57
 
58
  _, I = do_search(emb, ind)
59
  top1, top2, top3, top4, top5, top6, top7, top8, top9, top10 = get_top(I, ind_filenames, url_dict, catalog)
60
+ return embed_html_all, ind_filenames[I[0][0]].split('.')[0], top1, ind_filenames[I[0][1]].split('.')[0], top2, ind_filenames[I[0][2]].split('.')[0], top3, ind_filenames[I[0][3]].split('.')[0], top4, ind_filenames[I[0][4]].split('.')[0], top5, ind_filenames[I[0][5]].split('.')[0], top6, ind_filenames[I[0][6]].split('.')[0], top7, ind_filenames[I[0][7]].split('.')[0], top8, ind_filenames[I[0][8]].split('.')[0], top9, ind_filenames[I[0][9]].split('.')[0], top10
61
  except:
62
+ return embed_html_all, "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", "", "Erreur Input", ""
63
 
64
  poc_examples = [["https://www.youtube.com/watch?v=aNzCDt2eidg"]]
65