MekkCyber commited on
Commit
c6c7450
·
1 Parent(s): 16b6081
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -148,7 +148,7 @@ with gr.Blocks(theme=gr.themes.Ocean(), css=css) as app:
148
  app.load(hello, inputs=None, outputs=m1)
149
 
150
 
151
- radio = gr.Radio(["show", "hide"], label="Show Instructions")
152
  instructions = gr.Markdown(
153
  """
154
  ## Instructions
@@ -164,10 +164,10 @@ with gr.Blocks(theme=gr.themes.Ocean(), css=css) as app:
164
  """,
165
  visible=False
166
  )
167
- def update_visibility(radio): # Accept the event argument, even if not used
168
- value = radio # Get the selected value from the radio button
169
  if value == "show":
170
- return gr.Textbox(visible=True) #make it visible
171
  else:
172
  return gr.Textbox(visible=False)
173
  radio.change(update_visibility, radio, instructions)
 
148
  app.load(hello, inputs=None, outputs=m1)
149
 
150
 
151
+ radio = gr.Radio(["show", "hide"], label="Show Instructions", value="hide")
152
  instructions = gr.Markdown(
153
  """
154
  ## Instructions
 
164
  """,
165
  visible=False
166
  )
167
+ def update_visibility(radio):
168
+ value = radio
169
  if value == "show":
170
+ return gr.Textbox(visible=True)
171
  else:
172
  return gr.Textbox(visible=False)
173
  radio.change(update_visibility, radio, instructions)