Skip to content

Commit ddb17f2

Browse files
authored
fix gradio examples format for inpainting (#2738)
1 parent 444a3d1 commit ddb17f2

File tree

2 files changed

+79
-468
lines changed

2 files changed

+79
-468
lines changed

notebooks/inpainting-genai/gradio_helper.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ def prepare_examples():
2626
"castle.jpg": "https://github.com/user-attachments/assets/80f0750d-8ec4-42e3-915c-e2cc8631830c",
2727
"dog.jpg": "https://github.com/user-attachments/assets/6b8dc877-28b3-42e0-9e7f-3ec383867cd5",
2828
}
29+
composite_examples = []
2930
for file_name, url in data.items():
3031
if not Path(file_name).exists():
3132
Image.open(requests.get(url, stream=True).raw).resize((512, 512)).save(file_name)
32-
return list(data)
33+
composite_examples.append({"background": file_name, "layers": [], "composite": None})
34+
return composite_examples
3335

3436

3537
def make_demo(pipe):

0 commit comments

Comments
 (0)