hysts HF staff commited on
Commit
f9c22c7
1 Parent(s): c864bc6
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,7 +29,7 @@ def parse_args() -> argparse.Namespace:
29
 
30
  def main():
31
  args = parse_args()
32
- app = Model(device=args.device)
33
 
34
  with gr.Blocks(theme=args.theme, css='style.css') as demo:
35
  gr.Markdown(DESCRIPTION)
@@ -79,13 +79,13 @@ def main():
79
 
80
  gr.Markdown(FOOTER)
81
 
82
- generate_button1.click(app.generate_single_image,
83
  inputs=[seed1, psi1],
84
  outputs=generated_image1)
85
- generate_button2.click(app.generate_single_image,
86
  inputs=[seed2, psi2],
87
  outputs=generated_image2)
88
- interpolate_button.click(app.generate_interpolated_images,
89
  inputs=[seed1, psi1, seed2, psi2, num_frames],
90
  outputs=interpolated_images)
91
 
 
29
 
30
  def main():
31
  args = parse_args()
32
+ model = Model(device=args.device)
33
 
34
  with gr.Blocks(theme=args.theme, css='style.css') as demo:
35
  gr.Markdown(DESCRIPTION)
 
79
 
80
  gr.Markdown(FOOTER)
81
 
82
+ generate_button1.click(model.generate_single_image,
83
  inputs=[seed1, psi1],
84
  outputs=generated_image1)
85
+ generate_button2.click(model.generate_single_image,
86
  inputs=[seed2, psi2],
87
  outputs=generated_image2)
88
+ interpolate_button.click(model.generate_interpolated_images,
89
  inputs=[seed1, psi1, seed2, psi2, num_frames],
90
  outputs=interpolated_images)
91