Spaces:
Runtime error
Runtime error
Merge remote-tracking branch 'origin/main'
Browse files
app.py
CHANGED
@@ -303,18 +303,21 @@ with gradio.Blocks() as demo:
|
|
303 |
t1 = gradio.Dropdown(endpoint_types, label="Type 1", value=random.choice(endpoint_types))
|
304 |
d1 = gradio.Dropdown(density_options, label="Density 1", value=random.choice(density_options))
|
305 |
th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value=random.choice(thickness_options))
|
306 |
-
|
307 |
-
|
308 |
-
d1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
309 |
-
th1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
310 |
with gradio.Column():
|
311 |
t2 = gradio.Dropdown(endpoint_types, label="Type 2", value=random.choice(endpoint_types))
|
312 |
d2 = gradio.Dropdown(density_options, label="Density 2", value=random.choice(density_options))
|
313 |
th2 = gradio.Dropdown(thickness_options, label="Thickness 2", value=random.choice(thickness_options))
|
|
|
314 |
img2 = gradio.Image(label="Endpoint 2")
|
315 |
-
|
316 |
-
|
317 |
-
|
|
|
|
|
|
|
|
|
318 |
steps = gradio.Dropdown(interpolation_options, label="Interpolation Length", value=random.choice(interpolation_options))
|
319 |
btn = gradio.Button("Run")
|
320 |
img = gradio.Image(label="Transition")
|
|
|
303 |
t1 = gradio.Dropdown(endpoint_types, label="Type 1", value=random.choice(endpoint_types))
|
304 |
d1 = gradio.Dropdown(density_options, label="Density 1", value=random.choice(density_options))
|
305 |
th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value=random.choice(thickness_options))
|
306 |
+
with gradio.Column():
|
307 |
+
img1 = gradio.Image(label="Endpoint 2")
|
|
|
|
|
308 |
with gradio.Column():
|
309 |
t2 = gradio.Dropdown(endpoint_types, label="Type 2", value=random.choice(endpoint_types))
|
310 |
d2 = gradio.Dropdown(density_options, label="Density 2", value=random.choice(density_options))
|
311 |
th2 = gradio.Dropdown(thickness_options, label="Thickness 2", value=random.choice(thickness_options))
|
312 |
+
with gradio.Column():
|
313 |
img2 = gradio.Image(label="Endpoint 2")
|
314 |
+
|
315 |
+
t1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
316 |
+
d1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
317 |
+
th1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
318 |
+
t2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img2])
|
319 |
+
d2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img2])
|
320 |
+
th2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img2])
|
321 |
steps = gradio.Dropdown(interpolation_options, label="Interpolation Length", value=random.choice(interpolation_options))
|
322 |
btn = gradio.Button("Run")
|
323 |
img = gradio.Image(label="Transition")
|