Spaces:
Running
Running
Rename
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def parse_args() -> argparse.Namespace:
|
|
29 |
|
30 |
def main():
|
31 |
args = parse_args()
|
32 |
-
|
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(
|
83 |
inputs=[seed1, psi1],
|
84 |
outputs=generated_image1)
|
85 |
-
generate_button2.click(
|
86 |
inputs=[seed2, psi2],
|
87 |
outputs=generated_image2)
|
88 |
-
interpolate_button.click(
|
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 |
|