Update app.py
Browse files
app.py
CHANGED
@@ -1293,7 +1293,12 @@ def randomize_analysis(choice):
|
|
1293 |
width = random.uniform(3.0, 10.0)
|
1294 |
diameter = random.uniform(3.0, 10.0)
|
1295 |
choice2 = random.choice(["box", "cone", "sphere", "wedge", "cone"])
|
1296 |
-
|
|
|
|
|
|
|
|
|
|
|
1297 |
elif choice == "Pick Shape from Dataset":
|
1298 |
num = random.randint(1, 4999)
|
1299 |
return [gradio.Radio.update(), gradio.Slider.update(), gradio.Slider.update(), gradio.Slider.update(), gradio.Slider.update(), gradio.Number.update(num), gradio.Plot.update(geometry(num))]
|
|
|
1293 |
width = random.uniform(3.0, 10.0)
|
1294 |
diameter = random.uniform(3.0, 10.0)
|
1295 |
choice2 = random.choice(["box", "cone", "sphere", "wedge", "cone"])
|
1296 |
+
if choice2 == "box" or choice2 == "wedge":
|
1297 |
+
return [gradio.Radio.update(choice2), gradio.Slider.update(length), gradio.Slider.update(height), gradio.Slider.update(width), gradio.Slider.update(), gradio.Number.update(), gradio.Plot.update(make_voxels(choice2, length, height, width, diameter))]
|
1298 |
+
elif choice2 == "cone" or choice2 == "cylinder":
|
1299 |
+
return [gradio.Radio.update(choice2), gradio.Slider.update(), gradio.Slider.update(height), gradio.Slider.update(), gradio.Slider.update(diameter), gradio.Number.update(), gradio.Plot.update(make_voxels(choice2, length, height, width, diameter))]
|
1300 |
+
elif choice2 == "sphere":
|
1301 |
+
return [gradio.Radio.update(choice2), gradio.Slider.update(), gradio.Slider.update(), gradio.Slider.update(), gradio.Slider.update(diameter), gradio.Number.update(), gradio.Plot.update(make_voxels(choice2, length, height, width, diameter))]
|
1302 |
elif choice == "Pick Shape from Dataset":
|
1303 |
num = random.randint(1, 4999)
|
1304 |
return [gradio.Radio.update(), gradio.Slider.update(), gradio.Slider.update(), gradio.Slider.update(), gradio.Slider.update(), gradio.Number.update(num), gradio.Plot.update(geometry(num))]
|