PierreHanna commited on
Commit
0aec056
1 Parent(s): 8bf36d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,7 +35,7 @@ def process_url(input_path):
35
  def process_file(input_path):
36
  return process(input_path, '')
37
 
38
- def process(input_path):
39
  # setup the client
40
  client = SimbalsAPIClient(os.environ['TOKEN'], debug=True)
41
  # init the base parameters with your audio id and an audio url (or a local audio file)
@@ -70,7 +70,7 @@ def process(input_path):
70
 
71
  output_html = embed_html1 + id_spotify + embed_html2
72
 
73
- return output_text, output_html
74
  except IndexError:
75
  return "Not found. Please try again."
76
  time.sleep(1)
@@ -114,7 +114,7 @@ with gr.Blocks() as demo:
114
  outputs=[id, id_html])
115
 
116
  analyze_file_btn.click(process_file, inputs=[audio_input_file],
117
- outputs=[id, id_html])
118
 
119
  demo.queue(concurrency_count=2)
120
  demo.launch(debug=True)
 
35
  def process_file(input_path):
36
  return process(input_path, '')
37
 
38
+ def process(input_path, embed_html_all):
39
  # setup the client
40
  client = SimbalsAPIClient(os.environ['TOKEN'], debug=True)
41
  # init the base parameters with your audio id and an audio url (or a local audio file)
 
70
 
71
  output_html = embed_html1 + id_spotify + embed_html2
72
 
73
+ return output_text, output_html, embed_html_all
74
  except IndexError:
75
  return "Not found. Please try again."
76
  time.sleep(1)
 
114
  outputs=[id, id_html])
115
 
116
  analyze_file_btn.click(process_file, inputs=[audio_input_file],
117
+ outputs=[id, id_html, html])
118
 
119
  demo.queue(concurrency_count=2)
120
  demo.launch(debug=True)