Update app.py
Browse files
app.py
CHANGED
@@ -209,7 +209,7 @@ def change_textbox(choice):
|
|
209 |
|
210 |
|
211 |
def geometry_change(choice):
|
212 |
-
if choice == "
|
213 |
return [gradio.Radio.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Number.update(visible=False)]
|
214 |
elif choice == "Pick Shape from Dataset":
|
215 |
return [gradio.Radio.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Number.update(visible=True)]
|
@@ -240,7 +240,7 @@ with gradio.Blocks() as demo:
|
|
240 |
length = gradio.Slider(label="Length", interactive=True, minimum=3.0, maximum=10.0, value=6.5)
|
241 |
|
242 |
radio.change(fn=change_textbox, inputs=radio, outputs=[height, width, diameter, length])
|
243 |
-
num = gradio.Number(42, label="Type the index of the shape you would like to use or randomly select it.")
|
244 |
whence_commeth_geometry.change(fn=geometry_change, inputs=[whence_commeth_geometry], outputs=[radio, height, width, diameter, length, num])
|
245 |
btn1 = gradio.Button("Select")
|
246 |
with gradio.Column():
|
|
|
209 |
|
210 |
|
211 |
def geometry_change(choice):
|
212 |
+
if choice == "Construct Shape from Parameters":
|
213 |
return [gradio.Radio.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Number.update(visible=False)]
|
214 |
elif choice == "Pick Shape from Dataset":
|
215 |
return [gradio.Radio.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Number.update(visible=True)]
|
|
|
240 |
length = gradio.Slider(label="Length", interactive=True, minimum=3.0, maximum=10.0, value=6.5)
|
241 |
|
242 |
radio.change(fn=change_textbox, inputs=radio, outputs=[height, width, diameter, length])
|
243 |
+
num = gradio.Number(42, label="Type the index of the shape you would like to use or randomly select it.", visible=False)
|
244 |
whence_commeth_geometry.change(fn=geometry_change, inputs=[whence_commeth_geometry], outputs=[radio, height, width, diameter, length, num])
|
245 |
btn1 = gradio.Button("Select")
|
246 |
with gradio.Column():
|