Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -136,38 +136,38 @@ with gr.Blocks(css=css, title="ZenCtrl Inpainting") as demo:
|
|
| 136 |
|
| 137 |
# ---------- Example wrapper ---------------------------------
|
| 138 |
from pathlib import Path
|
| 139 |
-
def load_pil(
|
| 140 |
-
return Image.open(Path(
|
| 141 |
|
| 142 |
examples = [
|
| 143 |
[
|
| 144 |
-
"examples/sofa1.png",
|
| 145 |
-
{"image": "examples/sofa1_bg.png", "mask": None},
|
| 146 |
"add the sofa"
|
| 147 |
],
|
| 148 |
[
|
| 149 |
-
"examples/sofa2.png",
|
| 150 |
-
{"image": "examples/sofa2_bg.png", "mask": None},
|
| 151 |
"add this sofa"
|
| 152 |
],
|
| 153 |
[
|
| 154 |
-
"examples/chair1.png",
|
| 155 |
-
{"image": "examples/chair1_bg.png", "mask": None},
|
| 156 |
"add the chair"
|
| 157 |
],
|
| 158 |
[
|
| 159 |
-
"examples/console_table.png",
|
| 160 |
-
{"image": "examples/console_table_bg.png", "mask": None},
|
| 161 |
"Scandinavian console table against a gallery-style wall filled with abstract framed art"
|
| 162 |
],
|
| 163 |
[
|
| 164 |
-
"examples/office_chair.png",
|
| 165 |
-
{"image": "examples/office_chair_bg.png", "mask": None},
|
| 166 |
"office chair"
|
| 167 |
],
|
| 168 |
[
|
| 169 |
-
"examples/car.png",
|
| 170 |
-
{"image": "examples/car_bg.png", "mask": None},
|
| 171 |
"car on the road"
|
| 172 |
],
|
| 173 |
]
|
|
|
|
| 136 |
|
| 137 |
# ---------- Example wrapper ---------------------------------
|
| 138 |
from pathlib import Path
|
| 139 |
+
def load_pil(p): # tiny helper
|
| 140 |
+
return Image.open(Path(p))
|
| 141 |
|
| 142 |
examples = [
|
| 143 |
[
|
| 144 |
+
load_pil("examples/sofa1.png"),
|
| 145 |
+
{"image": load_pil("examples/sofa1_bg.png"), "mask": None},
|
| 146 |
"add the sofa"
|
| 147 |
],
|
| 148 |
[
|
| 149 |
+
load_pil("examples/sofa2.png"),
|
| 150 |
+
{"image": load_pil("examples/sofa2_bg.png"), "mask": None},
|
| 151 |
"add this sofa"
|
| 152 |
],
|
| 153 |
[
|
| 154 |
+
load_pil("examples/chair1.png"),
|
| 155 |
+
{"image": load_pil("examples/chair1_bg.png"), "mask": None},
|
| 156 |
"add the chair"
|
| 157 |
],
|
| 158 |
[
|
| 159 |
+
load_pil("examples/console_table.png"),
|
| 160 |
+
{"image": load_pil("examples/console_table_bg.png"), "mask": None},
|
| 161 |
"Scandinavian console table against a gallery-style wall filled with abstract framed art"
|
| 162 |
],
|
| 163 |
[
|
| 164 |
+
load_pil("examples/office_chair.png"),
|
| 165 |
+
{"image": load_pil("examples/office_chair_bg.png"), "mask": None},
|
| 166 |
"office chair"
|
| 167 |
],
|
| 168 |
[
|
| 169 |
+
load_pil("examples/car.png"),
|
| 170 |
+
{"image": load_pil("examples/car_bg.png"), "mask": None},
|
| 171 |
"car on the road"
|
| 172 |
],
|
| 173 |
]
|