Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -308,18 +308,21 @@ with gradio.Blocks() as demo:
|
|
308 |
t1 = gradio.Dropdown(endpoint_types, label="Type 1", value=random.choice(endpoint_types))
|
309 |
d1 = gradio.Dropdown(density_options, label="Density 1", value=random.choice(density_options))
|
310 |
th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value=random.choice(thickness_options))
|
311 |
-
|
312 |
-
|
313 |
-
d1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
314 |
-
th1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
315 |
with gradio.Column():
|
316 |
t2 = gradio.Dropdown(endpoint_types, label="Type 2", value=random.choice(endpoint_types))
|
317 |
d2 = gradio.Dropdown(density_options, label="Density 2", value=random.choice(density_options))
|
318 |
th2 = gradio.Dropdown(thickness_options, label="Thickness 2", value=random.choice(thickness_options))
|
|
|
319 |
img2 = gradio.Image(label="Endpoint 2")
|
320 |
-
|
321 |
-
|
322 |
-
|
|
|
|
|
|
|
|
|
323 |
steps = gradio.Dropdown(interpolation_options, label="Interpolation Length", value=random.choice(interpolation_options))
|
324 |
btn = gradio.Button("Run")
|
325 |
img = gradio.Image(label="Transition")
|
|
|
308 |
t1 = gradio.Dropdown(endpoint_types, label="Type 1", value=random.choice(endpoint_types))
|
309 |
d1 = gradio.Dropdown(density_options, label="Density 1", value=random.choice(density_options))
|
310 |
th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value=random.choice(thickness_options))
|
311 |
+
with gradio.Column():
|
312 |
+
img1 = gradio.Image(label="Endpoint 2")
|
|
|
|
|
313 |
with gradio.Column():
|
314 |
t2 = gradio.Dropdown(endpoint_types, label="Type 2", value=random.choice(endpoint_types))
|
315 |
d2 = gradio.Dropdown(density_options, label="Density 2", value=random.choice(density_options))
|
316 |
th2 = gradio.Dropdown(thickness_options, label="Thickness 2", value=random.choice(thickness_options))
|
317 |
+
with gradio.Column():
|
318 |
img2 = gradio.Image(label="Endpoint 2")
|
319 |
+
|
320 |
+
t1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
321 |
+
d1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
322 |
+
th1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
323 |
+
t2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img2])
|
324 |
+
d2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img2])
|
325 |
+
th2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img2])
|
326 |
steps = gradio.Dropdown(interpolation_options, label="Interpolation Length", value=random.choice(interpolation_options))
|
327 |
btn = gradio.Button("Run")
|
328 |
img = gradio.Image(label="Transition")
|