Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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,
|