akshansh36 commited on
Commit
e9d60a8
·
verified ·
1 Parent(s): 202ba9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -303,8 +303,8 @@ def button_conf():
303
  )
304
 
305
 
306
- def output_conf():
307
- return gr.File(label="Result", file_count="multiple", interactive=False), gr.Column(visible=False)
308
 
309
 
310
  def get_gui(theme):
@@ -315,13 +315,14 @@ def get_gui(theme):
315
  model = model_conf()
316
  indx = index_conf()
317
  button_base = button_conf()
318
- output_file, output_audio = output_conf()
 
319
 
320
  # Reset the audio column when new files are uploaded
321
  aud.change(
322
- fn=lambda: (gr.update(visible=False), []),
323
- inputs=None,
324
- outputs=[output_audio]
325
  )
326
 
327
  # Handle the processing and output generation
 
303
  )
304
 
305
 
306
+ # def output_conf():
307
+ # return gr.File(label="Result", file_count="multiple", interactive=False), gr.Column(visible=False)
308
 
309
 
310
  def get_gui(theme):
 
315
  model = model_conf()
316
  indx = index_conf()
317
  button_base = button_conf()
318
+ output_file = gr.File(label="Result", file_count="multiple", interactive=False)
319
+ output_audio = gr.Column(visible=False) # This will be dynamically updated with audio components
320
 
321
  # Reset the audio column when new files are uploaded
322
  aud.change(
323
+ lambda: gr.update(visible=False), # Reset visibility before new processing
324
+ None,
325
+ [output_audio]
326
  )
327
 
328
  # Handle the processing and output generation