ccm commited on
Commit
dc2d342
1 Parent(s): 3752130

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1270,15 +1270,15 @@ def synthesis_from_spectrum(df):
1270
  def change_textbox(choice, length, height, width, diameter):
1271
  fig = make_voxels(choice, length, height, width, diameter)
1272
  if choice == "cylinder":
1273
- return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Plot.update(values=fig)]
1274
  elif choice == "sphere":
1275
- return [gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Plot.update(values=fig)]
1276
  elif choice == "box":
1277
- return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Plot.update(values=fig)]
1278
  elif choice == "wedge":
1279
- return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Plot.update(values=fig)]
1280
  elif choice == "cone":
1281
- return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Plot.update(values=fig)]
1282
 
1283
 
1284
  import random
 
1270
  def change_textbox(choice, length, height, width, diameter):
1271
  fig = make_voxels(choice, length, height, width, diameter)
1272
  if choice == "cylinder":
1273
+ return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Plot.update(fig)]
1274
  elif choice == "sphere":
1275
+ return [gradio.Slider.update(visible=False), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Plot.update(fig)]
1276
  elif choice == "box":
1277
+ return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Plot.update(fig)]
1278
  elif choice == "wedge":
1279
+ return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Plot.update(fig)]
1280
  elif choice == "cone":
1281
+ return [gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Slider.update(visible=True), gradio.Slider.update(visible=False), gradio.Plot.update(fig)]
1282
 
1283
 
1284
  import random