ivanoctaviogaitansantos commited on
Commit
c298e3c
·
verified ·
1 Parent(s): 07bb496

Create app.py

Browse files

Nuevo modelo de autógena promt's

Files changed (1) hide show
  1. app.py +314 -0
app.py ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+ import gradio as gr
3
+ import random
4
+
5
+ class CelebrityLingerieProGenerator:
6
+ def __init__(self):
7
+ self.data = {
8
+ "TOPS": [
9
+ "a classic white blouse slightly unbuttoned, revealing collarbones and hint of lace bra",
10
+ "a translucent gauze blouse with a neck tie, silhouette softly visible beneath",
11
+ "a fitted boat neck silk blouse hugging curves with subtle sheen",
12
+ "a long-sleeved silk blouse with a deep back cutout tied by a satin ribbon",
13
+ "an off-shoulder linen blouse with a delicate pendant between cleavage",
14
+ "a sheer lace top with a deep V-neckline and scalloped edges",
15
+ "a strapless push-up top enhancing cleavage",
16
+ "a masculine blazer worn open, nothing underneath",
17
+ "a satin corset-style top with lace trim and delicate straps",
18
+ "a sheer mesh bodysuit with floral embroidery and pearl buttons",
19
+ "a vintage-inspired peplum blouse in black satin with bow at the neck",
20
+ "a deep-V lace chemise with adjustable straps and scalloped edges"
21
+ ],
22
+ "BOTTOMS": [
23
+ "a high-waisted pencil skirt with a daring back slit, riding up to subtly reveal lace thong",
24
+ "a wrap miniskirt with an adjustable bow, slightly undone to show lace thong",
25
+ "a fitted faux leather dress with provocative zippers, revealing lace thong in movement",
26
+ "a long-sleeved tight dress in glossy fabric, shifting to expose lace thong",
27
+ "a short stretch mesh dress with sheer fabric, lingerie subtly visible",
28
+ "a velvet mini dress with a thigh-high slit and deep back, revealing lace thong",
29
+ "a transparent tulle miniskirt with floral embroidery, lace thong peeking through",
30
+ "a short tube top in stretch satin with a flowing skirt, subtly showing lace thong",
31
+ "a high-slit satin skirt with asymmetric drape, shifting with motion",
32
+ "a black lace pencil skirt with side cutouts and delicate bow details"
33
+ ],
34
+ "BRAS_BRALETTES": [
35
+ "a sheer lace bralette with subtle floral details, subtly visible",
36
+ "a meticulously designed lace bra with delicate straps",
37
+ "a satin push-up bra with a lace overlay",
38
+ "an unlined lace bralette with delicate straps",
39
+ "a balconette bra in black satin with gold clasp and ribbon detail",
40
+ "a corset-style bustier with boning and lace panels, enhancing curves",
41
+ "a halter-neck lace bra with crisscross back straps",
42
+ "a strapless underwire bra with lace trim and heart-shaped cups"
43
+ ],
44
+ "HAIRSTYLES": [
45
+ "long, wavy auburn hair cascading over one shoulder",
46
+ "platinum blonde hair in soft Hollywood waves, glowing under light",
47
+ "deep burgundy hair in a loose side braid with face-framing tendrils",
48
+ "jet-black hair straightened to a mirror shine, falling past shoulders",
49
+ "rose-gold ombre hair in a voluminous blowout with soft curls",
50
+ "honey-blonde hair in a low chignon with a few strands artfully loose",
51
+ "copper-red hair in a high ponytail with a satin ribbon",
52
+ "long chocolate-brown hair with beachy waves and subtle highlights"
53
+ ]
54
+ }
55
+
56
+ self.color_palettes = {
57
+ "classic_black": {
58
+ "name": "Classic Black",
59
+ "colors": ["black", "onyx", "charcoal", "deep grey"],
60
+ "makeup": ["smoky eyes with black liner", "bold red lips", "nude lips with dark contour"],
61
+ "ambiance": ["dramatic chiaroscuro lighting", "moody ambient glow", "high-contrast shadows"]
62
+ },
63
+ "elegant_red": {
64
+ "name": "Elegant Red",
65
+ "colors": ["crimson", "burgundy", "ruby", "wine", "cherry"],
66
+ "makeup": ["bold red lips", "gold shimmer eyes", "warm bronze glow"],
67
+ "ambiance": ["warm golden hour light", "soft red ambient glow", "luxury boudoir lighting"]
68
+ },
69
+ "nude_satin": {
70
+ "name": "Nude Satin",
71
+ "colors": ["nude", "beige", "ivory", "taupe", "skin tone", "champagne"],
72
+ "makeup": ["dewy skin with highlight", "peach lips", "natural glam"],
73
+ "ambiance": ["soft daylight", "diffused window light", "minimalist bright setting"]
74
+ },
75
+ "royal_blue": {
76
+ "name": "Royal Blue",
77
+ "colors": ["sapphire", "navy", "cobalt", "midnight blue"],
78
+ "makeup": ["silver shimmer eyes", "plum lips", "cool-toned contour"],
79
+ "ambiance": ["cool studio lighting", "blue-tinted ambient glow", "modern luxury vibe"]
80
+ },
81
+ "passion_pink": {
82
+ "name": "Passion Pink",
83
+ "colors": ["rose", "blush", "magenta", "fuchsia", "dusty pink"],
84
+ "makeup": ["pink glossy lips", "soft pink cheeks", "shimmering rose eyes"],
85
+ "ambiance": ["soft pink ambient light", "pastel boudoir", "romantic glow"]
86
+ },
87
+ "violet_mystery": {
88
+ "name": "Violet Mystery",
89
+ "colors": ["purple", "lavender", "amethyst", "orchid", "grape"],
90
+ "makeup": ["deep plum lips", "violet eyeliner", "metallic lilac eyes"],
91
+ "ambiance": ["mysterious purple ambient light", "twilight mood", "artistic chiaroscuro"]
92
+ }
93
+ }
94
+
95
+ self.patterns = [
96
+ "floral lace", "geometric mesh", "polka dots", "fishnet with floral cutouts",
97
+ "baroque embroidery", "tattoo-style arabesques", "diagonal stripes",
98
+ "scattered pearls", "micro-sequins", "embossed satin texture",
99
+ "scallop edges", "crisscross straps", "transparent cutouts", "ombre fade", "diamond quilt"
100
+ ]
101
+
102
+ self.eye_contact = [
103
+ "direct eye contact, as if caught in the moment, slightly surprised but not bothered",
104
+ "soft, curious gaze, unaware of the accidental reveal",
105
+ "knowing glance, subtle smile, intimate connection with viewer",
106
+ "looking over shoulder, caught mid-movement, hint of mystery",
107
+ "lips slightly parted, eyes wide with surprise and allure",
108
+ "confident stare, projecting empowerment and elegance",
109
+ "tender, dreamy look, as if lost in thought"
110
+ ]
111
+
112
+ self.modes = {
113
+ "office": {
114
+ "environments": [
115
+ "minimalist modern office with glass walls, wooden desk, papers, laptop",
116
+ "executive office with floor-to-ceiling windows, city view, leather chair",
117
+ "bright home office with bookshelf, potted plant, and ergonomic desk",
118
+ "corporate meeting room with whiteboard, tablet, and coffee cup"
119
+ ],
120
+ "poses": [
121
+ "bending over slightly to pick up a pen, skirt rising naturally to reveal lace thong",
122
+ "reaching up to adjust a document on a high shelf, blouse tightening",
123
+ "sitting on the edge of her desk while typing, one leg slightly raised",
124
+ "leaning forward to read a screen, hair falling over shoulder",
125
+ "standing to organize files, one hip cocked, movement causing a slit to open",
126
+ "crossing her legs slowly while reviewing a report, then uncrossing",
127
+ "adjusting her stocking discreetly, hand near thigh",
128
+ "twisting in her chair to grab a notebook, fabric tension revealing lace thong"
129
+ ]
130
+ },
131
+ "boudoir": {
132
+ "environments": [
133
+ "luxurious bedroom with silk sheets, dim ambient light, vanity mirror",
134
+ "elegant boudoir with canopy bed, chaise lounge, and crystal lamp",
135
+ "soft-lit dressing room with full-length mirror and scattered jewelry",
136
+ "vintage-inspired bedroom with velvet curtains and antique furniture"
137
+ ],
138
+ "poses": [
139
+ "lying on her side on bed, leg lifted, thong visible, relaxed smile",
140
+ "on stomach, hips slightly raised, stockings on display, intense eye contact",
141
+ "on back, arms outstretched, dreamy gaze, relaxed sensuality",
142
+ "propped on elbows in bed, skirt up, lingerie visible, natural expression",
143
+ "sitting on the edge of bed, fixing hair, one strap slipping",
144
+ "kneeling on carpet, adjusting garter, skirt hiked up, shy glance",
145
+ "leaning against headboard, one leg bent, direct eye contact",
146
+ "sitting on vanity stool, applying lip gloss, reflection showing lingerie"
147
+ ]
148
+ },
149
+ "hybrid": {
150
+ "environments": [
151
+ "a luxurious home office with a king-sized bed in the background, soft daylight",
152
+ "a modern penthouse study with velvet sofa, glass desk, and boudoir mirror",
153
+ "an elegant bedroom with a large wooden desk, laptop, papers, and lingerie on the chair",
154
+ "a hotel suite with floor-to-ceiling windows, a writing desk, and silk sheets on the bed"
155
+ ],
156
+ "poses": [
157
+ "sitting on the edge of a bed with a laptop, silk blouse unbuttoned, one leg bent, garter visible",
158
+ "adjusting her stocking while sitting on a velvet chair next to a desk, papers scattered",
159
+ "leaning over a desk in a corset and pencil skirt, hair falling forward, looking back at camera",
160
+ "lying on a bed with one elbow propped, reading a document, lace thong peeking under skirt",
161
+ "standing between a wardrobe and desk, holding a blouse, looking at mirror, garter straps visible",
162
+ "sitting cross-legged on a sofa-bed, typing on laptop, sheer robe open, soft smile",
163
+ "fixing her hair in a boudoir mirror, one strap of bralette slipping, office documents on vanity",
164
+ "stretching after work, arms up, skirt riding up, fishnet stockings and garter on display"
165
+ ]
166
+ }
167
+ }
168
+
169
+ def generate_prompt(self, celebrity_name: str, mode: str = "hybrid", color_palette: str = "classic_black") -> str:
170
+ palette = self.color_palettes[color_palette]
171
+ color = random.choice(palette["colors"])
172
+ makeup_style = random.choice(palette["makeup"])
173
+ ambiance = random.choice(palette["ambiance"])
174
+ pattern = random.choice(self.patterns)
175
+
176
+ pick = lambda key: random.choice(self.data[key])
177
+ top = pick("TOPS").replace("white", color).replace("black", color).replace("burgundy", color)
178
+ bottom = pick("BOTTOMS").replace("black", color).replace("burgundy", color).replace("velvet", f"{color} velvet")
179
+ bra = pick("BRAS_BRALETTES").replace("black", color).replace("red", color)
180
+ hair = pick("HAIRSTYLES")
181
+
182
+ stockings = random.choice([
183
+ f"{color} lace thigh-high stockings with subtle {pattern}, slightly rolled for realism",
184
+ f"ultra-sheer 15-20 DEN pantyhose with {pattern} design, enhancing leg lines",
185
+ f"bold {pattern} stockings in {color}, adding edge",
186
+ f"opaque stockings in {color} with {pattern} embroidery",
187
+ f"{pattern}-pattern embroidered stockings with tattoo-like details"
188
+ ])
189
+
190
+ panties = random.choice([
191
+ f"a meticulously designed {pattern} lace thong with scalloped edges",
192
+ f"a brazilian lace panty with side bows and {pattern} trim",
193
+ f"a seamless micro-thong in {color}, implied by silhouette with {pattern} detail"
194
+ ])
195
+
196
+ environment = random.choice(self.modes[mode]["environments"])
197
+ pose = random.choice(self.modes[mode]["poses"])
198
+ gaze = random.choice(self.eye_contact)
199
+ makeup = f"{makeup_style}, flawless porcelain skin, soft contour"
200
+
201
+ positive_prompt = (
202
+ f"exact photorealistic portrait of {celebrity_name}, full-body, vibrant full color, "
203
+ f"ultra-realistic professional photography, UHD, 9:16 aspect ratio, vertical, "
204
+ f"from knees to head, no empty space, cinematic framing, "
205
+ f"{top} in {color}, {bottom} in {color}, {stockings}, {bra} in {color}, {panties}, "
206
+ f"delicate {pattern}, satin sheen, sheer layers, fabric tension, "
207
+ f"{hair}, {makeup}, flawless skin, "
208
+ f"{pose}, {gaze}, (direct eye contact:1.4), "
209
+ f"cinematic lighting with {ambiance}, soft fill, no harsh shadows, "
210
+ f"low-angle shot from floor level (worm's eye view), dynamic perspective, "
211
+ f"in {environment}, "
212
+ f"documents, laptop, wine glass, lingerie, or personal items nearby, "
213
+ f"candid moment, spontaneous scene, accidental lingerie reveal, "
214
+ f"as if photographed without full awareness, voyeuristic realism, "
215
+ f"sharp focus, high dynamic range, digital photography, ultra-detailed textures"
216
+ )
217
+
218
+ negative_prompt = (
219
+ "black and white, grayscale, sepia, monochrome, duotone, "
220
+ "bad framing, subject too small, too much headroom, empty space, cropped poorly, "
221
+ "cut off at knees, cut off at ankles, out of frame, border, watermark, logo, text, "
222
+ "harsh shadows, uneven lighting, shadow on face, underexposed, "
223
+ "blurry, noisy, oversaturated, jpeg artifacts, "
224
+ "wrong face, different person, uncanny valley, deformed face, mutated features, average face, "
225
+ "anime, cartoon, 3d render, painting, illustration, drawing, sketch, surreal, fantasy, "
226
+ "airbrushed, fake, prosthetic, doll-like, mannequin, "
227
+ "explicit nudity, visible genitalia, full exposure, topless, bare breasts, "
228
+ "lowres, bad anatomy, extra limbs, distorted hands, mutated legs"
229
+ )
230
+
231
+ return f"""
232
+ **Scene:** Candid moment — {celebrity_name} is engaged in a natural pose: *{pose}*.
233
+ At that instant, she **locks eyes with the viewer**, caught in a private, unintentional reveal.
234
+ Lingerie is visible **only due to posture or fabric movement** — not intentional exposure.
235
+ Captured in **vibrant {color} tones**, ultra-sharp focus, from a **low worm's eye view**.
236
+
237
+ **Color Theme:** {palette['name']} — harmonized across outfit, lighting, and mood.
238
+
239
+ **Outfit:** {top} in {color}, {bottom} in {color}, {stockings}, {bra} in {color}, {panties}.
240
+
241
+ **Hair & Makeup:** {hair}, {makeup} — matching the {color} palette.
242
+
243
+ **Setting:** {environment} with {ambiance}.
244
+
245
+ **Style:** Ultra-realistic photography, cinematic lighting, spontaneous moment.
246
+
247
+ ---
248
+
249
+ ### 🟩 ✅ Positive Prompt (REVE / SDXL)
250
+ {positive_prompt}
251
+
252
+ ---
253
+
254
+ ### 🟥 ❌ Negative Prompt
255
+ {negative_prompt}
256
+ """.strip()
257
+
258
+ generator = CelebrityLingerieProGenerator()
259
+
260
+ def generate_prompts(name, mode, color):
261
+ if not name.strip():
262
+ raise gr.Error("⚠️ Please enter a celebrity name.")
263
+ return [generator.generate_prompt(name.strip(), mode, color) for _ in range(5)]
264
+
265
+ with gr.Blocks(
266
+ title="🔥 BATUTO-Lingerie Pro v4",
267
+ theme=gr.themes.Soft(primary_hue="pink", secondary_hue="gray")
268
+ ) as demo:
269
+ gr.Markdown("""
270
+ # 🔥 BATUTO-Lingerie Pro v4 🍑
271
+ *Elegance. Realism. Chromatic Harmony.*
272
+
273
+ Generate **5 cinematic, themed prompts** with **color-coordinated lingerie**, **natural poses**, and **accidental reveals**.
274
+ """)
275
+
276
+ with gr.Row():
277
+ celeb_input = gr.Textbox(
278
+ label="🌟 Celebrity Name",
279
+ placeholder="e.g., Ana de Armas, Margot Robbie...",
280
+ lines=1
281
+ )
282
+
283
+ with gr.Row():
284
+ mode_radio = gr.Radio(
285
+ choices=["office", "boudoir", "hybrid"],
286
+ label="🎯 Theme",
287
+ value="hybrid",
288
+ interactive=True
289
+ )
290
+ color_dropdown = gr.Dropdown(
291
+ choices=[(v["name"], k) for k, v in generator.color_palettes.items()],
292
+ label="🎨 Color Palette",
293
+ value="classic_black",
294
+ interactive=True
295
+ )
296
+
297
+ generate_btn = gr.Button("✨ Generate 5 Prompts", variant="primary")
298
+
299
+ prompt_boxes = [
300
+ gr.Textbox(label=f"📸 Prompt #{i+1}", lines=20, interactive=False, show_copy_button=True)
301
+ for i in range(5)
302
+ ]
303
+
304
+ generate_btn.click(
305
+ fn=generate_prompts,
306
+ inputs=[celeb_input, mode_radio, color_dropdown],
307
+ outputs=prompt_boxes
308
+ )
309
+
310
+ gr.Markdown("""
311
+ > 💡 **Tip**: Use the **Positive Prompt** in **REVE Create, Leonardo AI, or SDXL** for photorealistic results.
312
+ """)
313
+
314
+ demo.launch()