Equityone commited on
Commit
619816a
·
verified ·
1 Parent(s): af93c5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -23
app.py CHANGED
@@ -59,7 +59,7 @@ ART_STYLES = {
59
  "negative_prompt": "realistic, photographic, subtle, muted colors"
60
  },
61
  # New styles added here
62
- "Noir et Blanc": { # Corrected syntax here
63
  "prompt_prefix": "black and white style poster, monochromatic design",
64
  "negative_prompt": "colorful, vibrant designs"
65
  },
@@ -69,25 +69,25 @@ ART_STYLES = {
69
  COMPOSITION_PARAMS = {
70
  # Layouts remain unchanged
71
  "Layouts": {
72
- "Centré": "centered composition, balanced layout",
73
- "Asymétrique": "dynamic asymmetrical composition",
74
- "Grille": "grid-based layout, structured composition",
75
- "Diagonal": "diagonal dynamic composition",
76
- "Minimaliste": "minimal composition, lots of whitespace",
77
- "Radial": "radial composition, circular arrangement",
78
- "En Z": "Z-shaped composition, guiding viewer's eye",
79
- "Règle des tiers": "rule of thirds composition",
80
  "Symétrie": "symmetrical composition, mirror-like balance",
81
- "Cadre dans le cadre": "frame within a frame composition"
82
- },
83
- # New ambiance added here
84
- "Ambiances": { # Corrected syntax here
85
- "Dramatique": "dramatic lighting, high contrast",
86
- "Doux": "soft lighting, gentle atmosphere",
87
- "Vibrant": "vibrant colors, energetic mood",
88
- "Mystérieux": "mysterious atmosphere, moody lighting",
89
- "Serein": "peaceful atmosphere, calm mood",
90
- "Rétro": "retro atmosphere, nostalgic mood",
91
  "Futuriste": "futuristic atmosphere, high-tech mood",
92
  "Onirique": "dreamy atmosphere, surreal mood",
93
  "Industriel": "industrial atmosphere, raw and urban mood",
@@ -95,7 +95,11 @@ COMPOSITION_PARAMS = {
95
  "Nocturne": "nocturnal atmosphere, dark and moody lighting"
96
  },
97
  # Palette remains unchanged
98
- ...
 
 
 
 
99
  }
100
 
101
  class ImageGenerator:
@@ -126,9 +130,9 @@ class ImageGenerator:
126
  prompt += f", {COMPOSITION_PARAMS['Palette'][params['palette']]}"
127
 
128
  for param, description in [
129
- ("detail_level", "highly detailed" if params.get("detail_level", 0) > 7 else "moderately detailed"),
130
- ("contrast", "high contrast" if params.get("contrast", 0) > 7 else "balanced contrast"),
131
- ("saturation", "vibrant colors" if params.get("saturation", 0) > 7 else "subtle colors")
132
  ]:
133
  if params.get(param):
134
  prompt += f", {description}"
 
59
  "negative_prompt": "realistic, photographic, subtle, muted colors"
60
  },
61
  # New styles added here
62
+ "Noir et Blanc": {
63
  "prompt_prefix": "black and white style poster, monochromatic design",
64
  "negative_prompt": "colorful, vibrant designs"
65
  },
 
69
  COMPOSITION_PARAMS = {
70
  # Layouts remain unchanged
71
  "Layouts": {
72
+ "Centré": "centered composition, balanced layout",
73
+ "Asymétrique": "dynamic asymmetrical composition",
74
+ "Grille": "grid-based layout, structured composition",
75
+ "Diagonal": "diagonal dynamic composition",
76
+ "Minimaliste": "minimal composition, lots of whitespace",
77
+ "Radial": "radial composition, circular arrangement",
78
+ "En Z": "Z-shaped composition, guiding viewer's eye",
79
+ "Règle des tiers": "rule of thirds composition",
80
  "Symétrie": "symmetrical composition, mirror-like balance",
81
+ "Cadre dans le cadre": "frame within a frame composition"
82
+ },
83
+ # New ambiance added here
84
+ "Ambiances": {
85
+ "Dramatique": "dramatic lighting, high contrast",
86
+ "Doux": "soft lighting, gentle atmosphere",
87
+ "Vibrant": "vibrant colors, energetic mood",
88
+ "Mystérieux": "mysterious atmosphere, moody lighting",
89
+ "Serein": "peaceful atmosphere, calm mood",
90
+ "Rétro": "retro atmosphere, nostalgic mood",
91
  "Futuriste": "futuristic atmosphere, high-tech mood",
92
  "Onirique": "dreamy atmosphere, surreal mood",
93
  "Industriel": "industrial atmosphere, raw and urban mood",
 
95
  "Nocturne": "nocturnal atmosphere, dark and moody lighting"
96
  },
97
  # Palette remains unchanged
98
+ # Define your palette options here as needed.
99
+ # Example:
100
+ # Palette: {
101
+ # ...
102
+ # }
103
  }
104
 
105
  class ImageGenerator:
 
130
  prompt += f", {COMPOSITION_PARAMS['Palette'][params['palette']]}"
131
 
132
  for param, description in [
133
+ ("detail_level", "highly detailed" if params.get("detail_level", 0) > 7 else "moderately detailed"),
134
+ ("contrast", "high contrast" if params.get("contrast", 0) > 7 else "balanced contrast"),
135
+ ("saturation", "vibrant colors" if params.get("saturation", 0) > 7 else "subtle colors")
136
  ]:
137
  if params.get(param):
138
  prompt += f", {description}"