ccm commited on
Commit
48aa2d0
1 Parent(s): 83102db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -298,14 +298,14 @@ def interpolate(t1, t2, d1, d2, th1, th2, steps):
298
  with gradio.Blocks() as demo:
299
  with gradio.Row():
300
  with gradio.Column():
301
- t1 = gradio.Dropdown(endpoint_types, label="Type 1", value="basic_box")
302
- d1 = gradio.Dropdown(density_options, label="Density 1", value="0.10")
303
- th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value="5")
304
  with gradio.Column():
305
- t2 = gradio.Dropdown(endpoint_types, label="Type 2", value="basic_box")
306
- d2 = gradio.Dropdown(density_options, label="Density 2", value="0.10")
307
- th2 = gradio.Dropdown(thickness_options, label="Thickness 2", value="5")
308
- steps = gradio.Dropdown(interpolation_options, label="Interpolation Length", value="5")
309
  btn = gradio.Button("Run")
310
  img = gradio.Image(label="Transition")
311
  btn.click(fn=interpolate, inputs=[t1, t2, d1, d2, th1, th2, steps], outputs=[img])
 
298
  with gradio.Blocks() as demo:
299
  with gradio.Row():
300
  with gradio.Column():
301
+ t1 = gradio.Dropdown(endpoint_types, label="Type 1", value=random.choice(endpoint_types))
302
+ d1 = gradio.Dropdown(density_options, label="Density 1", value=random.choice(density_options))
303
+ th1 = gradio.Dropdown(thickness_options, label="Thickness 1", value=random.choice(thickness_options))
304
  with gradio.Column():
305
+ t2 = gradio.Dropdown(endpoint_types, label="Type 2", value=random.choice(endpoint_types))
306
+ d2 = gradio.Dropdown(density_options, label="Density 2", random.choice(density_options))
307
+ th2 = gradio.Dropdown(thickness_options, label="Thickness 2", value=random.choice(thickness_options))
308
+ steps = gradio.Dropdown(interpolation_options, label="Interpolation Length", value=random.choice(interpolation_options))
309
  btn = gradio.Button("Run")
310
  img = gradio.Image(label="Transition")
311
  btn.click(fn=interpolate, inputs=[t1, t2, d1, d2, th1, th2, steps], outputs=[img])