salso commited on
Commit
7bf59b5
·
verified ·
1 Parent(s): bca738c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -16
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 --------------------------- background ------------------------------ prompt
144
- [load_pil("examples/sofa1.png"), load_pil("examples/sofa1_bg.png"), "add the sofa"],
145
- [load_pil("examples/sofa2.png"), load_pil("examples/sofa2_bg.png"), "add this sofa"],
146
- [load_pil("examples/chair1.png"), load_pil("examples/chair1_bg.png"), "add the chair"],
147
- [load_pil("examples/console_table.png"), load_pil("examples/console_table_bg.png"),
148
- "Scandinavian console table against a gallery-style wall filled with abstract framed art"],
149
- [load_pil("examples/office_chair.png"), load_pil("examples/office_chair_bg.png"), "office chair"],
150
- [load_pil("examples/car.png"), load_pil("examples/car_bg.png"), "car on the road"],
151
  ]
152
-
153
 
154
- # ---------- Examples block ------------------------
155
  gr.Examples(
156
- examples = examples,
157
- inputs = [subj_img, ref_img, promptbox], # match the three widgets
158
- label = "Visual Presets – Subject · Background · Prompt",
159
- examples_per_page = "all",
160
- cache_examples = False, # no need to cache; we’re only auto-filling widgets
161
- preprocess = False # tell Gradio “the values are already in widget format”
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 --------------------------