Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -126,19 +126,26 @@ with gr.Blocks(css="style.css") as app:
|
|
| 126 |
# Tab untuk Intpainting
|
| 127 |
with gr.Tab ("Inpainting"):
|
| 128 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
with gr.Column():
|
| 130 |
image = gr.ImageMask(sources=["upload"], layers=False, transforms=[], format="png", label="base image", show_label=True)
|
| 131 |
btn = gr.Button("Inpaint!", elem_id="run_button")
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
| 135 |
steps = gr.Number(value=20, minimum=10, maximum=30, step=1, label="steps")
|
| 136 |
-
|
| 137 |
-
scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
|
| 138 |
with gr.Column():
|
| 139 |
image_out = gr.Image(label="Output", elem_id="output-img")
|
| 140 |
|
| 141 |
-
btn.click(fn=intpaint_func, inputs=[image,
|
| 142 |
|
| 143 |
|
| 144 |
# Tab untuk Describe
|
|
|
|
| 126 |
# Tab untuk Intpainting
|
| 127 |
with gr.Tab ("Inpainting"):
|
| 128 |
with gr.Row():
|
| 129 |
+
with gr.Row():
|
| 130 |
+
with gr.Column(scale=1):
|
| 131 |
+
prompt_inpainting = gr.Textbox(label="Prompt", placeholder="Enter Prompt", lines=2, elem_id="prompt-input")
|
| 132 |
+
neg_prompt_inpainting = gr.Textbox(label="Negative prompt", placeholder="Enter Negative Prompt (optional)", lines=2, elem_id="neg-prompt-input")
|
| 133 |
+
generate_t2i = gr.Button("Generate", elem_id="generate_t2i", scale=0.13)
|
| 134 |
+
|
| 135 |
with gr.Column():
|
| 136 |
image = gr.ImageMask(sources=["upload"], layers=False, transforms=[], format="png", label="base image", show_label=True)
|
| 137 |
btn = gr.Button("Inpaint!", elem_id="run_button")
|
| 138 |
+
with gr.Row():
|
| 139 |
+
scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
|
| 140 |
+
with gr.Row():
|
| 141 |
+
strength = gr.Number(value=0.99, minimum=0.01, maximum=1.0, step=0.01, label="strength")
|
| 142 |
+
with gr.Row():
|
| 143 |
steps = gr.Number(value=20, minimum=10, maximum=30, step=1, label="steps")
|
| 144 |
+
guidance_scale = gr.Number(value=7.5, minimum=1.0, maximum=20.0, step=0.1, label="guidance_scale")
|
|
|
|
| 145 |
with gr.Column():
|
| 146 |
image_out = gr.Image(label="Output", elem_id="output-img")
|
| 147 |
|
| 148 |
+
btn.click(fn=intpaint_func, inputs=[image, prompt_inpainting, neg_prompt_inpainting, guidance_scale, steps, strength, scheduler], outputs=[image_out])
|
| 149 |
|
| 150 |
|
| 151 |
# Tab untuk Describe
|