Rejekts commited on
Commit
eebe326
1 Parent(s): 4644d21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -113,7 +113,11 @@ def show_available(filepath,format=None):
113
  else:
114
  print(f"Does not match format: {file}")
115
  print(f"Matches: {files}")
 
 
116
  return files
 
 
117
  return os.listdir(filepath)
118
 
119
  def upload_file(file):
@@ -142,6 +146,8 @@ def update_audio_player(choice):
142
  return os.path.join("audios",choice)
143
 
144
  with gr.Blocks() as app:
 
 
145
  with gr.Row():
146
  with gr.Column():
147
  with gr.Tabs():
 
113
  else:
114
  print(f"Does not match format: {file}")
115
  print(f"Matches: {files}")
116
+ if len(files) < 1:
117
+ return ['']
118
  return files
119
+ if len(os.listdir(filepath)) < 1:
120
+ return ['']
121
  return os.listdir(filepath)
122
 
123
  def upload_file(file):
 
146
  return os.path.join("audios",choice)
147
 
148
  with gr.Blocks() as app:
149
+ with gr.Row():
150
+ gr.HTML("")
151
  with gr.Row():
152
  with gr.Column():
153
  with gr.Tabs():