Update app.py (#2)
Browse files- Update app.py (3f957c9a206df83648cda117c1d62b9cb79c4b4a)
Co-authored-by: 谢集 <[email protected]>
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def infer(edit_images,
|
|
| 53 |
progress=gr.Progress(track_tqdm=True)
|
| 54 |
):
|
| 55 |
|
| 56 |
-
image = edit_images
|
| 57 |
|
| 58 |
if image.size[0] != 512:
|
| 59 |
print("\033[93m[WARNING] We can only deal with the case where the image's width is 512.\033[0m")
|
|
@@ -120,13 +120,11 @@ More **open-source**, with **lower costs**, **faster speed** (it takes about 9 s
|
|
| 120 |
""")
|
| 121 |
with gr.Row():
|
| 122 |
with gr.Column():
|
| 123 |
-
edit_image = gr.
|
| 124 |
-
label='Upload
|
| 125 |
type='pil',
|
| 126 |
sources=["upload", "webcam"],
|
| 127 |
image_mode='RGB',
|
| 128 |
-
layers=False,
|
| 129 |
-
brush=gr.Brush(colors=["#FFFFFF"], color_mode="fixed"),
|
| 130 |
height=600
|
| 131 |
)
|
| 132 |
prompt = gr.Text(
|
|
|
|
| 53 |
progress=gr.Progress(track_tqdm=True)
|
| 54 |
):
|
| 55 |
|
| 56 |
+
image = edit_images
|
| 57 |
|
| 58 |
if image.size[0] != 512:
|
| 59 |
print("\033[93m[WARNING] We can only deal with the case where the image's width is 512.\033[0m")
|
|
|
|
| 120 |
""")
|
| 121 |
with gr.Row():
|
| 122 |
with gr.Column():
|
| 123 |
+
edit_image = gr.Image(
|
| 124 |
+
label='Upload image for editing',
|
| 125 |
type='pil',
|
| 126 |
sources=["upload", "webcam"],
|
| 127 |
image_mode='RGB',
|
|
|
|
|
|
|
| 128 |
height=600
|
| 129 |
)
|
| 130 |
prompt = gr.Text(
|