Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -286,7 +286,7 @@ with gr.Blocks(css="style.css", js=js_func) as demo:
|
|
| 286 |
with gr.Row():
|
| 287 |
with gr.Column():
|
| 288 |
with gr.Group():
|
| 289 |
-
image = gr.ImageEditor(
|
| 290 |
prompt = gr.Textbox(label="Prompt")
|
| 291 |
style = gr.Dropdown(label="Style", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME)
|
| 292 |
use_hed = gr.Checkbox(label="use HED detector", value=False, info="check this box if you upload an image and want to turn it to a sketch")
|
|
@@ -326,10 +326,7 @@ with gr.Blocks(css="style.css", js=js_func) as demo:
|
|
| 326 |
value=0,
|
| 327 |
)
|
| 328 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 329 |
-
|
| 330 |
-
# Ensure the gr.ImageEditor displays the resized image correctly
|
| 331 |
-
image.update_image(resized_image)
|
| 332 |
-
|
| 333 |
with gr.Column():
|
| 334 |
with gr.Group():
|
| 335 |
image_slider = ImageSlider(position=0.5)
|
|
@@ -358,4 +355,6 @@ with gr.Blocks(css="style.css", js=js_func) as demo:
|
|
| 358 |
fn=run, inputs=inputs, outputs=outputs
|
| 359 |
)
|
| 360 |
|
| 361 |
-
|
|
|
|
|
|
|
|
|
| 286 |
with gr.Row():
|
| 287 |
with gr.Column():
|
| 288 |
with gr.Group():
|
| 289 |
+
image = gr.ImageEditor(type="pil", label="Sketch your image or upload one", width=512, height=512)
|
| 290 |
prompt = gr.Textbox(label="Prompt")
|
| 291 |
style = gr.Dropdown(label="Style", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME)
|
| 292 |
use_hed = gr.Checkbox(label="use HED detector", value=False, info="check this box if you upload an image and want to turn it to a sketch")
|
|
|
|
| 326 |
value=0,
|
| 327 |
)
|
| 328 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 329 |
+
|
|
|
|
|
|
|
|
|
|
| 330 |
with gr.Column():
|
| 331 |
with gr.Group():
|
| 332 |
image_slider = ImageSlider(position=0.5)
|
|
|
|
| 355 |
fn=run, inputs=inputs, outputs=outputs
|
| 356 |
)
|
| 357 |
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
demo.queue().launch()
|