jaker86 commited on
Commit
d36d5a2
·
verified ·
1 Parent(s): 6c81648

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -359,7 +359,12 @@ with gr.Blocks() as demo:
359
  def update_inputs(file, label_col):
360
  print(f"Updating inputs with file: {file}, label_col: {label_col}") # Debug logging
361
  components = create_interactive_inputs(file, label_col)
362
- return components, gr.Column(visible=True, elements=components) # Use elements instead of components
 
 
 
 
 
363
 
364
  file_input.change(
365
  fn=update_inputs,
 
359
  def update_inputs(file, label_col):
360
  print(f"Updating inputs with file: {file}, label_col: {label_col}") # Debug logging
361
  components = create_interactive_inputs(file, label_col)
362
+ # Return the components and update the Column's visibility
363
+ return components, gr.update(visible=True) # Only update visibility, components are rendered in Blocks
364
+ # Use Blocks to render components dynamically
365
+ with dynamic_inputs:
366
+ for component in components:
367
+ component.render()
368
 
369
  file_input.change(
370
  fn=update_inputs,