Spaces:
Running
on
Zero
Running
on
Zero
Commit
Β·
ad87b2d
1
Parent(s):
8a326c2
Fix duplicate Picasso-style descriptors in prompt enhancement
Browse filesPrevent duplication of style descriptors when they already exist in the prompt,
eliminating repeated text in the Status box output.
π€ Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
app.py
CHANGED
@@ -40,8 +40,12 @@ def generate_image(prompt, num_inference_steps=28, guidance_scale=3.5):
|
|
40 |
return None, "π Loading AI model... Please wait a moment and try again!"
|
41 |
|
42 |
try:
|
43 |
-
# Enhance prompt for Picasso style
|
44 |
-
|
|
|
|
|
|
|
|
|
45 |
|
46 |
# Generate image with FLUX parameters
|
47 |
image = model_pipe(
|
|
|
40 |
return None, "π Loading AI model... Please wait a moment and try again!"
|
41 |
|
42 |
try:
|
43 |
+
# Enhance prompt for Picasso style (avoid duplication)
|
44 |
+
picasso_style = "in the style of Pablo Picasso, cubist painting, abstract art, geometric shapes, fragmented forms, bold colors"
|
45 |
+
if picasso_style not in prompt:
|
46 |
+
enhanced_prompt = f"{prompt}, {picasso_style}"
|
47 |
+
else:
|
48 |
+
enhanced_prompt = prompt
|
49 |
|
50 |
# Generate image with FLUX parameters
|
51 |
image = model_pipe(
|