Spaces:
Runtime error
Runtime error
Change to URL
Browse files
app.py
CHANGED
|
@@ -37,13 +37,15 @@ def generate_with_mask_(image_path: str, cloth_path: str = None, prompt: str = N
|
|
| 37 |
with gr.Blocks() as demo:
|
| 38 |
with gr.Column():
|
| 39 |
with gr.Row():
|
| 40 |
-
image = gr.inputs.Image(label = "Input Image")
|
|
|
|
| 41 |
with gr.Row():
|
| 42 |
-
cloth = gr.inputs.Image(label = "Cloth Image")
|
|
|
|
| 43 |
with gr.Row():
|
| 44 |
prompt = gr.inputs.Textbox(lines=5, label="Editing Prompt")
|
| 45 |
with gr.Column():
|
| 46 |
-
output = gr.outputs.Image(label="Generated Image")
|
| 47 |
run = gr.Button(label="Generate Preview")
|
| 48 |
run.click(generate_with_mask_, inputs=[image, cloth, prompt], outputs=output)
|
| 49 |
|
|
|
|
| 37 |
with gr.Blocks() as demo:
|
| 38 |
with gr.Column():
|
| 39 |
with gr.Row():
|
| 40 |
+
# image = gr.inputs.Image(type = "pil", label = "Input Image")
|
| 41 |
+
image_url = gr.inputs.Textbox(label = "Input Image URL")
|
| 42 |
with gr.Row():
|
| 43 |
+
# cloth = gr.inputs.Image(type = "pil", label = "Cloth Image")
|
| 44 |
+
cloth_url = gr.inputs.Textbox(label = "Cloth Image URL")
|
| 45 |
with gr.Row():
|
| 46 |
prompt = gr.inputs.Textbox(lines=5, label="Editing Prompt")
|
| 47 |
with gr.Column():
|
| 48 |
+
output = gr.outputs.Image(type = "pil", label="Generated Image")
|
| 49 |
run = gr.Button(label="Generate Preview")
|
| 50 |
run.click(generate_with_mask_, inputs=[image, cloth, prompt], outputs=output)
|
| 51 |
|