Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -411,7 +411,7 @@ def create_demo():
|
|
| 411 |
bg_source = gr.Radio(choices=[e.value for e in BGSource], value=BGSource.NONE.value, label="Preferenca e Ndriçimit", type='value')
|
| 412 |
aspect_ratio = gr.Radio(choices=["9:16", "1:1", "16:9"], value="1:1", label="Raporti i Aspektit")
|
| 413 |
relight_button = gr.Button(value="Rindriço")
|
| 414 |
-
|
| 415 |
# Hidden components for other parameters and output_bg
|
| 416 |
image_width = gr.Slider(label="Gjerësia e Imazhit", minimum=256, maximum=1024, value=640, step=64, visible=False)
|
| 417 |
image_height = gr.Slider(label="Lartësia e Imazhit", minimum=256, maximum=1024, value=640, step=64, visible=False)
|
|
@@ -438,7 +438,7 @@ def create_demo():
|
|
| 438 |
input_fg, prompt, image_width, image_height, num_samples, seed, steps,
|
| 439 |
a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source
|
| 440 |
]
|
| 441 |
-
relight_button.click(fn=process_relight, inputs=ips, outputs=[output_bg,
|
| 442 |
|
| 443 |
return block
|
| 444 |
|
|
|
|
| 411 |
bg_source = gr.Radio(choices=[e.value for e in BGSource], value=BGSource.NONE.value, label="Preferenca e Ndriçimit", type='value')
|
| 412 |
aspect_ratio = gr.Radio(choices=["9:16", "1:1", "16:9"], value="1:1", label="Raporti i Aspektit")
|
| 413 |
relight_button = gr.Button(value="Rindriço")
|
| 414 |
+
result_image = gr.Image(label="Rezultati", type="numpy", height=480, width=480, elem_classes="constrained-container")
|
| 415 |
# Hidden components for other parameters and output_bg
|
| 416 |
image_width = gr.Slider(label="Gjerësia e Imazhit", minimum=256, maximum=1024, value=640, step=64, visible=False)
|
| 417 |
image_height = gr.Slider(label="Lartësia e Imazhit", minimum=256, maximum=1024, value=640, step=64, visible=False)
|
|
|
|
| 438 |
input_fg, prompt, image_width, image_height, num_samples, seed, steps,
|
| 439 |
a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source
|
| 440 |
]
|
| 441 |
+
relight_button.click(fn=process_relight, inputs=ips, outputs=[output_bg, result_image])
|
| 442 |
|
| 443 |
return block
|
| 444 |
|