Spaces:
Sleeping
Sleeping
MekkCyber
commited on
Commit
·
c6c7450
1
Parent(s):
16b6081
fix
Browse files
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):
|
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)
|
|
|
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)
|