Spaces:
Running
Running
Two cleanups
Browse files
app.py
CHANGED
@@ -303,7 +303,7 @@ with gradio.Blocks() as demo:
|
|
303 |
d1 = gradio.Dropdown(density_options, label="Density 1", value=random.choice(density_options))
|
304 |
th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value=random.choice(thickness_options))
|
305 |
with gradio.Column():
|
306 |
-
img1 = gradio.Image(label="Endpoint
|
307 |
with gradio.Column():
|
308 |
t2 = gradio.Dropdown(endpoint_types, label="Type 2", value=random.choice(endpoint_types))
|
309 |
d2 = gradio.Dropdown(density_options, label="Density 2", value=random.choice(density_options))
|
@@ -314,15 +314,8 @@ with gradio.Blocks() as demo:
|
|
314 |
lattice_inputs_1 = [t1, d1, th1]
|
315 |
[x.change(fn=generate_unit_cell, inputs=lattice_inputs_1, outputs=[img1]) for x in lattice_inputs_1]
|
316 |
lattice_inputs_2 = [t2, d2, th2]
|
317 |
-
[x.change(fn=generate_unit_cell, inputs=
|
318 |
-
|
319 |
-
# t1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
320 |
-
# d1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
321 |
-
# th1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
|
322 |
-
#
|
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")
|
|
|
303 |
d1 = gradio.Dropdown(density_options, label="Density 1", value=random.choice(density_options))
|
304 |
th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value=random.choice(thickness_options))
|
305 |
with gradio.Column():
|
306 |
+
img1 = gradio.Image(label="Endpoint 1")
|
307 |
with gradio.Column():
|
308 |
t2 = gradio.Dropdown(endpoint_types, label="Type 2", value=random.choice(endpoint_types))
|
309 |
d2 = gradio.Dropdown(density_options, label="Density 2", value=random.choice(density_options))
|
|
|
314 |
lattice_inputs_1 = [t1, d1, th1]
|
315 |
[x.change(fn=generate_unit_cell, inputs=lattice_inputs_1, outputs=[img1]) for x in lattice_inputs_1]
|
316 |
lattice_inputs_2 = [t2, d2, th2]
|
317 |
+
[x.change(fn=generate_unit_cell, inputs=lattice_inputs_2, outputs=[img2]) for x in lattice_inputs_2]
|
318 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
steps = gradio.Dropdown(interpolation_options, label="Interpolation Length", value=random.choice(interpolation_options))
|
320 |
btn = gradio.Button("Run")
|
321 |
img = gradio.Image(label="Transition")
|