Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,25 +140,23 @@ with gr.Blocks(css=css, title="ZenCtrl Inpainting") as demo:
|
|
| 140 |
return Image.open(Path(p))
|
| 141 |
|
| 142 |
examples = [
|
| 143 |
-
# subject
|
| 144 |
-
[
|
| 145 |
-
[
|
| 146 |
-
[
|
| 147 |
-
[
|
| 148 |
-
|
| 149 |
-
[
|
| 150 |
-
[
|
| 151 |
]
|
| 152 |
-
|
| 153 |
|
| 154 |
-
# ---------- Examples block ------------------------
|
| 155 |
gr.Examples(
|
| 156 |
-
examples
|
| 157 |
-
inputs
|
| 158 |
-
label
|
| 159 |
-
|
| 160 |
-
cache_examples = False,
|
| 161 |
-
|
| 162 |
)
|
| 163 |
|
| 164 |
# ---------- Buttons & interactions --------------------------
|
|
|
|
| 140 |
return Image.open(Path(p))
|
| 141 |
|
| 142 |
examples = [
|
| 143 |
+
# subject path background-image path prompt
|
| 144 |
+
["examples/sofa1.png", "examples/sofa1_bg.png", "add the sofa"],
|
| 145 |
+
["examples/sofa2.png", "examples/sofa2_bg.png", "add this sofa"],
|
| 146 |
+
["examples/chair1.png", "examples/chair1_bg.png", "add the chair"],
|
| 147 |
+
["examples/console_table.png","examples/console_table_bg.png",
|
| 148 |
+
"Scandinavian console table against a gallery-style wall filled with abstract framed art"],
|
| 149 |
+
["examples/office_chair.png","examples/office_chair_bg.png", "office chair"],
|
| 150 |
+
["examples/car.png", "examples/car_bg.png", "car on the road"],
|
| 151 |
]
|
|
|
|
| 152 |
|
|
|
|
| 153 |
gr.Examples(
|
| 154 |
+
examples = examples, # ← plain strings only
|
| 155 |
+
inputs = [subj_img, ref_img, promptbox],
|
| 156 |
+
label = "Visual Presets – Subject · Background · Prompt",
|
| 157 |
+
preprocess = False, # <-- tell Gradio they are *already* images
|
| 158 |
+
cache_examples = False,
|
| 159 |
+
examples_per_page= "all",
|
| 160 |
)
|
| 161 |
|
| 162 |
# ---------- Buttons & interactions --------------------------
|