nevreal commited on
Commit
a0a4ea6
·
verified ·
1 Parent(s): 3561e6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -61,15 +61,9 @@ with gr.Blocks() as demo:
61
 
62
  # Event to update the selected model based on the checkbox
63
  use_textbox.change(
64
- lambda checked: model_dropdown.update(visible=not checked, value=None),
65
  inputs=[use_textbox],
66
- outputs=[model_dropdown]
67
- )
68
-
69
- use_textbox.change(
70
- lambda checked: custom_model_textbox.update(visible=checked, value=""),
71
- inputs=[use_textbox],
72
- outputs=[custom_model_textbox]
73
  )
74
 
75
  # Button to confirm selection
@@ -87,4 +81,4 @@ with gr.Blocks() as demo:
87
  )
88
 
89
  # Launch the Gradio app
90
- demo.launch()
 
61
 
62
  # Event to update the selected model based on the checkbox
63
  use_textbox.change(
64
+ lambda checked: (not checked, None, "" if checked else None),
65
  inputs=[use_textbox],
66
+ outputs=[model_dropdown, custom_model_textbox]
 
 
 
 
 
 
67
  )
68
 
69
  # Button to confirm selection
 
81
  )
82
 
83
  # Launch the Gradio app
84
+ demo.launch(share=True)