Spaces:
Sleeping
Sleeping
Commit ·
7d8bf38
1
Parent(s): 9825259
Move EXAMPLES_CONFIG to examples.json
Browse filesCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- app.py +2 -26
- examples.json +26 -0
app.py
CHANGED
|
@@ -48,32 +48,8 @@ print("Using default attention processor (FA3 skipped for ZeroGPU GPU-arch compa
|
|
| 48 |
|
| 49 |
print("torch.compile skipped: lazy Triton kernel compilation inside @spaces.GPU always exceeds ZeroGPU's task timeout.")
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
"images": ["examples/1.jpg"],
|
| 54 |
-
"prompt": "She is wearing a Ninja costume",
|
| 55 |
-
},
|
| 56 |
-
{
|
| 57 |
-
"images": ["examples/2.jpg"],
|
| 58 |
-
"prompt": "Transform the image into a dotted cartoon style.",
|
| 59 |
-
},
|
| 60 |
-
{
|
| 61 |
-
"images": ["examples/3.jpeg"],
|
| 62 |
-
"prompt": "Convert it to black and white.",
|
| 63 |
-
},
|
| 64 |
-
{
|
| 65 |
-
"images": ["examples/4.jpg", "examples/5.jpg"],
|
| 66 |
-
"prompt": "Replace her glasses with the new glasses from image 1.",
|
| 67 |
-
},
|
| 68 |
-
{
|
| 69 |
-
"images": ["examples/8.jpg", "examples/9.png"],
|
| 70 |
-
"prompt": "Replace the current clothing with the clothing from the reference image 2. Keep the person's face, hairstyle, body pose, background, lighting, and camera angle unchanged. Ensure the new outfit fits naturally with realistic fabric texture, proper shadows, folds, and accurate proportions. Match the lighting, color tone, and overall style for a seamless and high-quality result.",
|
| 71 |
-
},
|
| 72 |
-
{
|
| 73 |
-
"images": ["examples/10.jpg", "examples/11.png"],
|
| 74 |
-
"prompt": "Replace the current clothing with the clothing from the reference image 2. Keep the person's face, hairstyle, body pose, background, lighting, and camera angle unchanged. Ensure the new outfit fits naturally with realistic fabric texture, proper shadows, folds, and accurate proportions. Match the lighting, color tone, and overall style for a seamless and high-quality result.",
|
| 75 |
-
},
|
| 76 |
-
]
|
| 77 |
|
| 78 |
|
| 79 |
def make_thumb_b64(path, max_dim=220):
|
|
|
|
| 48 |
|
| 49 |
print("torch.compile skipped: lazy Triton kernel compilation inside @spaces.GPU always exceeds ZeroGPU's task timeout.")
|
| 50 |
|
| 51 |
+
with open("examples.json") as _f:
|
| 52 |
+
EXAMPLES_CONFIG = json.load(_f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
|
| 55 |
def make_thumb_b64(path, max_dim=220):
|
examples.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"images": ["examples/1.jpg"],
|
| 4 |
+
"prompt": "She is wearing a Ninja costume"
|
| 5 |
+
},
|
| 6 |
+
{
|
| 7 |
+
"images": ["examples/2.jpg"],
|
| 8 |
+
"prompt": "Transform the image into a dotted cartoon style."
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"images": ["examples/3.jpeg"],
|
| 12 |
+
"prompt": "Convert it to black and white."
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"images": ["examples/4.jpg", "examples/5.jpg"],
|
| 16 |
+
"prompt": "Replace her glasses with the new glasses from image 1."
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"images": ["examples/8.jpg", "examples/9.png"],
|
| 20 |
+
"prompt": "Replace the current clothing with the clothing from the reference image 2. Keep the person's face, hairstyle, body pose, background, lighting, and camera angle unchanged. Ensure the new outfit fits naturally with realistic fabric texture, proper shadows, folds, and accurate proportions. Match the lighting, color tone, and overall style for a seamless and high-quality result."
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"images": ["examples/10.jpg", "examples/11.png"],
|
| 24 |
+
"prompt": "Replace the current clothing with the clothing from the reference image 2. Keep the person's face, hairstyle, body pose, background, lighting, and camera angle unchanged. Ensure the new outfit fits naturally with realistic fabric texture, proper shadows, folds, and accurate proportions. Match the lighting, color tone, and overall style for a seamless and high-quality result."
|
| 25 |
+
}
|
| 26 |
+
]
|