Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,12 @@ def generate_image(width):
|
|
7 |
image = pipe(image_size=width).images[0]
|
8 |
return image
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
7 |
image = pipe(image_size=width).images[0]
|
8 |
return image
|
9 |
|
10 |
+
with gr.Blocks() as demo:
|
11 |
+
with gr.Row():
|
12 |
+
width_slider = gr.Slider(label="Width", value=128, minimum=128, maximum=1024, step=2, info="The width of the image in pixels")
|
13 |
+
output_image = gr.Image(label="Generated Image")
|
14 |
+
|
15 |
+
btn = gr.Button("Generate Image")
|
16 |
+
btn.click(fn=generate_image, inputs=width_slider, outputs=output_image)
|
17 |
+
|
18 |
+
demo.launch()
|