ccm commited on
Commit
00adeb9
·
2 Parent(s): 7d77c56 89f97e0

Merge remote-tracking branch 'origin/main'

Browse files
Files changed (1) hide show
  1. app.py +10 -7
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
- img1 = gradio.Image(label="Endpoint 1")
307
- t1.change(fn=generate_unit_cell, inputs=[t1, d1, th1], outputs=[img1])
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
- t2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img1])
316
- d2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img1])
317
- th2.change(fn=generate_unit_cell, inputs=[t2, d2, th2], outputs=[img1])
 
 
 
 
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")