Spaces:
Runtime error
Runtime error
main.py
CHANGED
|
@@ -23,6 +23,10 @@ def example(_image):
|
|
| 23 |
pass
|
| 24 |
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
def ui():
|
| 27 |
with gr.Blocks() as app:
|
| 28 |
with gr.Row():
|
|
@@ -44,12 +48,16 @@ def ui():
|
|
| 44 |
|
| 45 |
with gr.Column():
|
| 46 |
output_image = gr.Image(type="pil", label="Output Image")
|
|
|
|
| 47 |
|
| 48 |
gr.Markdown(
|
| 49 |
"The lllyasviel's original repo is [here](https://github.com/lllyasviel/AdverseCleaner/tree/main)."
|
| 50 |
)
|
| 51 |
|
| 52 |
start_btn.click(fn=clean_image, inputs=[input_image], outputs=[output_image])
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
app.launch()
|
| 55 |
|
|
|
|
| 23 |
pass
|
| 24 |
|
| 25 |
|
| 26 |
+
def send_to_input(output):
|
| 27 |
+
return output
|
| 28 |
+
|
| 29 |
+
|
| 30 |
def ui():
|
| 31 |
with gr.Blocks() as app:
|
| 32 |
with gr.Row():
|
|
|
|
| 48 |
|
| 49 |
with gr.Column():
|
| 50 |
output_image = gr.Image(type="pil", label="Output Image")
|
| 51 |
+
send_to_input_btn = gr.Button(value="Use as input", variant="secondary")
|
| 52 |
|
| 53 |
gr.Markdown(
|
| 54 |
"The lllyasviel's original repo is [here](https://github.com/lllyasviel/AdverseCleaner/tree/main)."
|
| 55 |
)
|
| 56 |
|
| 57 |
start_btn.click(fn=clean_image, inputs=[input_image], outputs=[output_image])
|
| 58 |
+
send_to_input_btn.click(
|
| 59 |
+
fn=send_to_input, inputs=[output_image], outputs=[input_image]
|
| 60 |
+
)
|
| 61 |
|
| 62 |
app.launch()
|
| 63 |
|