andromeda01111 commited on
Commit
e34bafc
Β·
verified Β·
1 Parent(s): b0210fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -123,12 +123,11 @@ with gr.Blocks() as demo:
123
  output_text = gr.Textbox(label="πŸ” Model Prediction", interactive=False)
124
 
125
  # Toggle input fields based on model selection
126
- def toggle_inputs(choice):
127
  """Toggle visibility of inputs based on model selection."""
128
- image_visibility = choice == "ViT"
129
- feature_visibility = choice == "Neural Network"
130
-
131
- return [gr.update(visible=image_visibility)] + [gr.update(visible=feature_visibility)] * len(feature_inputs)
132
 
133
  model_selector.change(toggle_inputs, model_selector, [image_input, *feature_inputs])
134
 
 
123
  output_text = gr.Textbox(label="πŸ” Model Prediction", interactive=False)
124
 
125
  # Toggle input fields based on model selection
 
126
  """Toggle visibility of inputs based on model selection."""
127
+ def toggle_inputs(choice):
128
+ image_visibility = choice == "ViT"
129
+ feature_visibility = choice == "Neural Network"
130
+ return [gr.update(visible=image_visibility)] + [gr.update(visible=feature_visibility)] * len(feature_inputs)
131
 
132
  model_selector.change(toggle_inputs, model_selector, [image_input, *feature_inputs])
133