Logan Zoellner commited on
Commit
a3da63c
1 Parent(s): 326480a

variable reuse

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,12 +31,12 @@ with demo:
31
  with gr.Row():
32
  seed=gr.Number(default=0, label='Seed'),
33
  psi=gr.Slider(0, 2, step=0.05, default=0.7, label='Truncation psi')
34
- img = gr.Image(label="portrait",type="filepath", shape=(256,256))
35
  model = gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
36
  file= gr.File(label="Download 3D Model")
37
 
38
 
39
- b0.click(generate_image,inputs=[seed,psi],outputs=img)
40
- b1.click(generate_model, inputs=img, outputs=[model,file])
41
 
42
  demo.launch(enable_queue=True, debug=True)
 
31
  with gr.Row():
32
  seed=gr.Number(default=0, label='Seed'),
33
  psi=gr.Slider(0, 2, step=0.05, default=0.7, label='Truncation psi')
34
+ outputImage = gr.Image(label="portrait",type="filepath", shape=(256,256))
35
  model = gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
36
  file= gr.File(label="Download 3D Model")
37
 
38
 
39
+ b0.click(generate_image,inputs=[seed,psi],outputs=outputImage)
40
+ b1.click(generate_model, inputs=outputImage, outputs=[model,file])
41
 
42
  demo.launch(enable_queue=True, debug=True)