Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def create_tshirt_preview(design_image, tshirt_color="white"):
|
|
36 |
design_image = design_image.resize((design_width, design_height), Image.Resampling.LANCZOS)
|
37 |
|
38 |
# Calculate position to center design on shirt
|
39 |
-
x = (tshirt_width - design_width) // 2
|
40 |
y = int(tshirt_height * 0.20) # Adjust this value based on your template
|
41 |
|
42 |
# If design has transparency (RGBA), create mask
|
@@ -92,7 +92,8 @@ def enhance_prompt_for_tshirt(prompt, style=None):
|
|
92 |
"vintage": ["distressed effect", "retro typography", "vintage illustration"],
|
93 |
"artistic": ["hand-drawn style", "watercolor effect", "artistic illustration"],
|
94 |
"geometric": ["abstract shapes", "geometric patterns", "modern design"],
|
95 |
-
"typography": ["bold typography", "creative lettering", "text-based design"]
|
|
|
96 |
}
|
97 |
|
98 |
base_terms = [
|
@@ -147,8 +148,8 @@ TSHIRT_COLORS = {
|
|
147 |
examples = [
|
148 |
["Cool geometric mountain landscape", "minimal", "White"],
|
149 |
["Vintage motorcycle with flames", "vintage", "Black"],
|
150 |
-
["
|
151 |
-
["Adventure
|
152 |
]
|
153 |
|
154 |
styles = [
|
@@ -156,7 +157,8 @@ styles = [
|
|
156 |
"vintage",
|
157 |
"artistic",
|
158 |
"geometric",
|
159 |
-
"typography"
|
|
|
160 |
]
|
161 |
|
162 |
css = """
|
|
|
36 |
design_image = design_image.resize((design_width, design_height), Image.Resampling.LANCZOS)
|
37 |
|
38 |
# Calculate position to center design on shirt
|
39 |
+
x = (tshirt_width - design_width) // 2
|
40 |
y = int(tshirt_height * 0.20) # Adjust this value based on your template
|
41 |
|
42 |
# If design has transparency (RGBA), create mask
|
|
|
92 |
"vintage": ["distressed effect", "retro typography", "vintage illustration"],
|
93 |
"artistic": ["hand-drawn style", "watercolor effect", "artistic illustration"],
|
94 |
"geometric": ["abstract shapes", "geometric patterns", "modern design"],
|
95 |
+
"typography": ["bold typography", "creative lettering", "text-based design"],
|
96 |
+
"realistic": ["realistic", "cinematic", "photograph"]
|
97 |
}
|
98 |
|
99 |
base_terms = [
|
|
|
148 |
examples = [
|
149 |
["Cool geometric mountain landscape", "minimal", "White"],
|
150 |
["Vintage motorcycle with flames", "vintage", "Black"],
|
151 |
+
["flamingo in scenic forset", "realistic", "White"],
|
152 |
+
["Adventure Starts typography", "typography", "White"]
|
153 |
]
|
154 |
|
155 |
styles = [
|
|
|
157 |
"vintage",
|
158 |
"artistic",
|
159 |
"geometric",
|
160 |
+
"typography",
|
161 |
+
"realistic"
|
162 |
]
|
163 |
|
164 |
css = """
|