Rejekts commited on
Commit
ae1ca35
·
1 Parent(s): ed6a17b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -29,7 +29,6 @@ def upload_file(file):
29
  file_name, file_extension = os.path.splitext(file.name)
30
  if file_extension.lower() in audio_formats:
31
  shutil.move(file.name,'audios')
32
- return show_available('audios')
33
  elif file_extension.lower().endswith('.pth'):
34
  shutil.move(file.name,'assets/weights')
35
  elif file_extension.lower().endswith('.index'):
@@ -41,7 +40,7 @@ def upload_file(file):
41
  with gr.Blocks() as app:
42
  with gr.Row():
43
  dropbox = gr.Dropbox(label="Upload files")
44
- audio_picker= gr.Dropdown(label="",choices=show_available('audios'))
45
  dropbox.upload(fn=upload_file, inputs=['dropbox'],outputs=['audio_picker'])
46
 
47
  app.launch()
 
29
  file_name, file_extension = os.path.splitext(file.name)
30
  if file_extension.lower() in audio_formats:
31
  shutil.move(file.name,'audios')
 
32
  elif file_extension.lower().endswith('.pth'):
33
  shutil.move(file.name,'assets/weights')
34
  elif file_extension.lower().endswith('.index'):
 
40
  with gr.Blocks() as app:
41
  with gr.Row():
42
  dropbox = gr.Dropbox(label="Upload files")
43
+ audio_picker = gr.Dropdown(label="",choices=show_available('audios'))
44
  dropbox.upload(fn=upload_file, inputs=['dropbox'],outputs=['audio_picker'])
45
 
46
  app.launch()