Update app.py
Browse files
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(
|
| 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(
|
| 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(
|
| 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(
|
| 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(
|
| 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
|