Spaces:
Sleeping
Sleeping
| import random | |
| import gradio as gr | |
| from typing import List | |
| # --- Consolidated Dictionaries --- | |
| FASHION_ELEMENTS = { | |
| "colors": [ | |
| "intense ruby", "classic black", "emerald green", "sapphire blue", "royal purple", | |
| "champagne gold", "metallic silver", "burgundy wine", "chocolate brown", "ivory white", | |
| "intense pink", "electric blue", "vibrant orange", "forest green", "midnight navy", | |
| "soft lavender", "peach coral", "platinum silver", "rose gold", "caramel nude" | |
| ], | |
| "outfits": [ | |
| "fitted mini dress with subtle texture that caresses curves", | |
| "A-line mini skirt with a delicate blouse that flows with movement", | |
| "tight bodycon dress with elegant draping that follows the silhouette", | |
| "sheath mini dress with unique details that catch the light", | |
| "playful skater dress with a flattering silhouette that moves harmoniously", | |
| "mini wrap dress that elegantly accentuates the waist", | |
| "modern slip dress with a luxurious satin finish that shines softly", | |
| "pencil mini skirt with a modern cut that emphasizes the figure", | |
| "flowing chiffon dress with intricate patterns that create a play of light", | |
| "fitted leather mini skirt with bold accents that contrast with softness" | |
| ], | |
| "lingerie_thongs": [ | |
| "Belgian floral lace thongs with delicate patterns", | |
| "thongs with French bow details and chantilly lace", | |
| "sheer thongs with geometric lace and shimmering threads", | |
| "thongs with high-quality guipure lace scalloped edges", | |
| "plain thongs with stretchy lace that adapts perfectly", | |
| "textured thongs with relief lace and 3D motifs", | |
| "shimmering thongs with metallic lace that reflects light", | |
| "light leavers lace thongs with strategic transparencies", | |
| "thongs with an openwork lace net pattern that creates a play of shadows", | |
| "embroidered thongs with silk threads and pearl details" | |
| ], | |
| "lingerie_bras": [ | |
| "push-up bra with delicate lace", | |
| "underwire bra with precise contour lace", | |
| "sheer cup bra with openwork lace", | |
| "demi-cup bra with high-quality stretch lace", | |
| "plain cup bra with subtle lace details", | |
| "padded bra with soft-touch lace", | |
| "balconette bra with French chantilly lace", | |
| "light coverage bra with stretch lace", | |
| "bra with sheer straps and applied lace", | |
| "embroidered bra with luxury guipure lace" | |
| ], | |
| "lingerie_details": [ | |
| "delicate lace details with scalloped edges", | |
| "satin accessories that complement the lace", | |
| "strategic sheer panels that showcase the lace", | |
| "scalloped edges that emphasize the lace texture", | |
| "embellished with subtle crystals on the lace pattern", | |
| "bow details that enhance the delicacy of the lace", | |
| "plunging neckline that shows the bra's lace", | |
| "underwire support discreetly integrated into the lace", | |
| "removable garters that harmonize with the lace set" | |
| ], | |
| "stockings": [ | |
| "sheer high stockings with a lace top that matches the thong", | |
| "fishnet high stockings with a pattern that complements the lace design", | |
| "silk high stockings with a soft finish that contrasts with the lace texture", | |
| "high stockings with garters that integrate with the lace set", | |
| "velvet high stockings with a soft texture next to the lace", | |
| "satin high stockings with a subtle sheen that harmonizes with the lace", | |
| "mesh high stockings with a net pattern that complements the lace", | |
| "high stockings with a light, airy feel that doesn't compete with the lace", | |
| "opaque high stockings with a matte look that contrasts with the lace's shine", | |
| "sheer high stockings with a tint that coordinates with the lace color" | |
| ], | |
| "hairstyles": [ | |
| "long reddish-brown hair with elegant waves that catch natural light", | |
| "long and straight platinum blonde hair that flows with golden highlights under the sun", | |
| "long dark brown hair with soft curls that create a play of light and shadows", | |
| "long layered red hair with a voluminous style that glows in the daylight", | |
| "long and straight black hair with a glossy finish that reflects ambient light", | |
| "long golden blonde hair with beach waves that shimmer in natural light", | |
| "long brown hair with braids and loose ends that softly catch the light", | |
| "intricate updo with honey highlights that shine under the daylight", | |
| "long messy mahogany hair with dimensions enhanced by natural light", | |
| "long and straight cherry red hair that glows intensely under daylight" | |
| ], | |
| "expressions": [ | |
| "seductive gaze full of desire, with eyes slightly squinted by natural light", | |
| "soft and confident gaze, with the face bathed in warm daylight", | |
| "intimate yet professional gaze, with natural expressions enhanced by soft light", | |
| "focused gaze, with bright eyes thanks to natural lighting", | |
| "confident or slightly flirtatious gaze, accented by natural reflections", | |
| "direct and secure gaze, with makeup perfectly lit by daylight", | |
| "mysterious gaze, with natural shadows that add depth to the expression", | |
| "suggestive and soft gaze, enhanced by the ambient glow", | |
| "seductive gaze at the camera, with natural glints in the eyes", | |
| "intense and passionate gaze, with natural light accentuating every emotional nuance" | |
| ], | |
| "boudoir_office_poses": [ | |
| ("Legs slightly apart with a slight torso twist, hands gently touching the skirt or lace thong, confident and direct or slightly flirty gaze towards the camera"), | |
| ("Sitting on the edge of the desk with one leg crossed over the other, skirt delicately lifted with one hand to show the lace thong, soft and confident look directed at the lens"), | |
| ("Standing beside the desk with legs slightly apart, one hand resting on the table and the other subtly touching the skirt or lace thong, confident or slightly flirty gaze downward to the camera"), | |
| ("Walking with the skirt slightly lifted, one leg forward in a natural step, hands adjusting accessories, focused and direct look at the camera showing the lace thong"), | |
| ("Standing with one leg forward and the skirt subtly moved, weight on the back leg allowing the skirt to slide to clearly show the lace thong, hand on the hip, direct and confident look"), | |
| ("Leaning on a chair turned backwards, legs slightly apart, skirt gently lifted with hands on the waist or on the fabric to reveal the lace thong, confident expression and direct look at the lens"), | |
| ("Crossed legs with the skirt deliberately shifted to show the lace thong, natural and feminine posture, soft and suggestive gaze towards the camera"), | |
| ("One leg slightly raised and resting against the desk, hand touching the skirt or adjusting the lace thong, seductive direct look at the camera"), | |
| ("Hands on the waist subtly lifting the garment to clearly show the lace thong, straight and upright posture, confident and dominant gaze downward to the camera"), | |
| ("Standing with hands behind the back, slightly arched torso, legs slightly apart showing the silhouette and lace thong, fixed and intense look at the lens"), | |
| ("Walking with a soft step, skirt flowing and slightly lifted to reveal the lace thong, one hand playing with the edge of the skirt, confident expression and gaze at the camera"), | |
| ("Sitting on an office chair, knees crossed with the skirt raised to show the lace thong, hands resting on the backrest, relaxed and attractive gaze directed at the lens"), | |
| ("Standing with torso twisted and one leg crossed in front of the other, hand holding the skirt to clearly show the lace thong, mysterious and direct look at the camera"), | |
| ("Sitting slightly leaning back with one leg stretched and the other bent, hands on the waist, skirt arranged to display the lace thong, confident yet sweet expression looking at the camera"), | |
| ("Arching the back while stretching, outfit lifted to fully reveal the lace thong, looking back with intense desire directly at the camera"), | |
| ("Reclining on the office desk, legs subtly apart showing the lace thong, eyes fixed on the camera with subtle ecstasy gesture"), | |
| ("Kneeling on the office floor, skirt raised to clearly show the lace thong, looking up directly at the camera with a desire expression"), | |
| ("Sitting on a high office stool, legs crossed and skirt deliberately lifted to display the lace thong, direct and intense look at the camera"), | |
| ("Leaning over an office railing, outfit stretched to reveal the lace thong, looking back with playful desire expression directed at the camera"), | |
| ("Reclining on a sofa in the office, legs positioned to clearly show the lace thong, eyes conveying subtle ecstasy looking at the camera"), | |
| ("Standing with hands on hips, skirt flowing to reveal the lace thong, direct eye contact with passionate desire at the camera"), | |
| ("Sitting on the edge of a sofa, adjusting stockings to show the lace thong, intense desire gaze directed at the lens"), | |
| ("Reaching for a high object on a shelf, outfit lifted to show the lace thong, turning head with desire look towards the camera"), | |
| ("Dancing sensually, spin causing the skirt to lift momentarily revealing the lace thong, passionate gaze directed at the camera"), | |
| ("Applying lipstick in front of a mirror, leaning slightly to reveal the lace thong, looking at the viewer with an expression of desire"), | |
| ("Reading a document in a provocative position, legs positioned to show the lace thong, looking up at the camera with subtle blush"), | |
| ("Heating food with playful movements, leaning towards the microwave showing the lace thong, turning with a desire smile towards the camera"), | |
| ("Exercising with a deep stretching pose, outfit hinting at the lace thong, eyes meeting the viewer directly"), | |
| ("Brushing long hair, movement causing the outfit to shift to show the lace thong, intense gaze directed at the camera"), | |
| ("Talking on the phone with seductive posture, walking, skirt flowing to reveal the lace thong, desire expression looking at the camera"), | |
| ("Watering office plants with bending and reaching, lace thong clearly visible, looking back at the camera with subtle gesture"), | |
| ("Trying on heels, sitting and adjusting them to show the lace thong, seductive gaze directly at the lens"), | |
| ("Folding clothes with a suggestive bend, movement revealing the lace thong, eyes with expression of desire looking at the camera"), | |
| ("Working at the desk with relaxed posture, leaning back, legs slightly apart showing the lace thong, direct look at the camera"), | |
| ("Standing with one hand on the hip, relaxed shoulders, skirt placed to display the lace thong, soft but direct gaze at the camera"), | |
| ("Sitting sideways on an office chair, legs crossed elegantly showing the lace thong, looking over the shoulder towards the camera"), | |
| ("Lying on the side on a sofa with head resting on hand, legs slightly bent to show the lace thong, serene expression looking at the camera"), | |
| ("Leaning against the office wall with one foot raised, hands running through hair, skirt arranged to reveal the lace thong, subtle smile directed at the camera"), | |
| ("Curled up on a sofa, hugging knees, eyes gently closed"), | |
| ("Lying on back on a sofa with arms above head, slightly arching to show the lace thong, eyes on camera"), | |
| ("Seated on the floor with legs extended, torso twisted to camera, soft smile"), | |
| ("Standing with back to camera, looking over shoulder with a sultry look"), | |
| ("Resting chin on hand, elbow on knee, casual yet elegant gaze"), | |
| ("Hands gently framing face, soft tousled hair, relaxed posture"), | |
| ("Lying on stomach with crossed ankles, chin resting on hands, playful smile"), | |
| ("Standing with arms above head, elongating body, peaceful expression"), | |
| ("Seated on edge of a sofa, one leg crossed over the other, eyes downward"), | |
| ("Leaning forward on a chair, elbows on knees, intense gaze"), | |
| ("Standing in a flowing robe or blazer, holding belt loosely, inviting expression"), | |
| ("Sitting with legs tucked under, looking sideways, soft smile"), | |
| ("Lying diagonally on a sofa, arm stretched out, relaxed and elegant"), | |
| ("Standing with hands clasped behind back, head tilted, soft gaze"), | |
| ("Sitting with knees bent, arms wrapped around legs, contemplative look"), | |
| ("Legs slightly apart with weight on one, the other slightly forward and relaxed, arms gently crossed or hands on waist, skirt positioned to display the lace thong, confident and direct gaze at the camera"), | |
| ("Hands on hips for a firm stance, legs shoulder-width apart, head slightly tilted with seductive expression looking at the camera"), | |
| ("Legs slightly apart with one knee bent, one leg straight with weight, the other with knee slightly bent and toe pointing, relaxed arms, skirt moved to reveal the lace thong, intense gaze directed at the lens"), | |
| ("Legs slightly separated, one leg somewhat forward pointing outward, hands resting on thighs or lower skirt to show the lace thong, elegant and confident expression looking at the camera"), | |
| ("Legs slightly apart, arms crossed or gently hugging the body, skirt positioned to display the lace thong, contained and sophisticated sensual gaze directed at the camera"), | |
| ("Legs slightly apart with twisted torso, turning body and head slightly to soften the pose, skirt arranged to show the lace thong, gaze towards the lens or profile suggestive"), | |
| ("Squatting with legs slightly apart and hands resting on thighs, creating a visual line clearly showing the lace thong, expression of sensuality and elegance looking at the camera"), | |
| ("Squatting with hands gently on thighs or slightly to the sides, delicately touching the skirt or lace thong, tactile and suggestive gaze directed at the lens"), | |
| ("Torso slightly leaning forward or sideways to add dynamism, skirt placed to display the lace thong, soft and confident gaze for intimate connection with the camera"), | |
| ("Squatting and resting on heels, legs slightly apart, arm resting on the floor or thigh, skirt positioned to show the lace thong, head slightly tilted with seductive look at the lens"), | |
| ("Squatting with arms around legs, holding them gently or ankles, skirt arranged to reveal the lace thong, direct eye contact or lowered gaze of vulnerability or mystery towards the camera"), | |
| ("Squatting with hands raised, resting behind or raised to touch hair or neck, arched body to show the lace thong, fixed gaze at the lens with sophisticated and sensual pose") | |
| ], | |
| "camera_angles": [ | |
| "extremely low angle from ground level, slightly tilted up, filling the frame up close to capture every detail of the lace", | |
| "worm's-eye view, gently tilted up, focusing tightly on the textures and details", | |
| "low angle capturing the full figure from below, gently tilted up, filling the frame to highlight the lace textures", | |
| "dramatic low angle emphasizing height and shape, gently tilted up, filling the frame to show intricate details", | |
| "close-up from a low angle focusing on the lower body and outfit from below, gently tilted up, filling the frame with detailed textures" | |
| ], | |
| "backgrounds": [ | |
| "modern executive office with large windows that flood the space with natural daylight and city views", | |
| "chic minimalist office with soft natural light entering through large windows, creating soft reflections on smooth surfaces", | |
| "luxurious hotel suite with upholstered furniture and large windows that allow abundant daylight to pass through", | |
| "sophisticated office with elegant decor and floor-to-ceiling windows that bathe the scene in natural light", | |
| "modern art gallery with clean lines and skylights that distribute natural light evenly", | |
| "executive library with wooden bookshelves and arched windows that project patterns of natural light", | |
| "industrial loft with large antique windows that filter daylight atmospherically", | |
| "premium boardroom with a polished wooden table that reflects the natural light from large windows", | |
| "executive penthouse with an indoor terrace and glass walls that maximize natural light entry", | |
| "photo studio with natural light simulated by large diffusing windows" | |
| ], | |
| "lighting": [ | |
| "soft diffuse natural light entering through large windows, creating delicate reflections on lace textures", | |
| "daylight filtered through translucent curtains, softening shadows and accentuating details", | |
| "direct natural light from mid-afternoon that creates interesting patterns and highlights the intricate lace texture", | |
| "golden hour light that bathes the scene in warm tones and enhances textile details", | |
| "daytime ambient light that gently envelops the subject, minimizing harsh shadows and highlighting qualities", | |
| "bright high-key natural light that illuminates uniformly without overexposing delicate details", | |
| "dramatic low-key daylight that creates soft contrasts and emphasizes the dimensions of the lace", | |
| "natural contour light that softly highlights the silhouette and enhances textured edges", | |
| "soft north-facing window light that provides consistent and flattering illumination for detailed textures", | |
| "reflected natural light that bounces off light surfaces, creating a soft, enveloping illumination" | |
| ], | |
| "texture_emphasis": [ | |
| "extreme emphasis on the intricate texture of the lace, capturing every thread and pattern with crystal clarity", | |
| "sharp focus on the tactile quality of the lace, showing its delicacy and dimensional structure", | |
| "highlighting the interaction between natural light and the textured surfaces of the lace", | |
| "enhancing the depth and complexity of the lace patterns with precise natural lighting", | |
| "capturing the tactile sensuality of the lace against the skin, with every detail visible and tangible", | |
| "showcasing the play of transparencies and opacities in the lace design with natural light", | |
| "emphasis on the luxurious quality of the lace and its natural drape on the figure", | |
| "highlighting the contrasts between the dense and transparent areas of the lace pattern", | |
| "capturing the softness and flexibility of the elastic lace as it conforms to curves", | |
| "showcasing the subtle reflections and light-absorbing qualities of different types of lace" | |
| ] | |
| } | |
| PROMPT_COMPONENTS = { | |
| "luxury_lingerie": [ | |
| ("delicate lace thong, perfectly visible without obstruction by hands or fabric, highlighting intricate embroidery and texture", "silk and lace thong elegantly shown, uncovered, emphasizing sensual design"), | |
| ("exquisite lace thong clearly visible, unobstructed with delicate floral patterns", "fine lingerie thong with subtle mesh, view unobstructed to emphasize sensuality"), | |
| ("sophisticated thong with lace details, hands away to showcase fine textures", "minimalist lace thong, focus on intricate details") | |
| ], | |
| "hairstyle_styles": [ | |
| ("long loose hair sensually framing the face", "elegant waves falling seductively over shoulders"), | |
| ("straight hair accentuating the neck and facial features", "voluminous curls enhancing the sensual appearance"), | |
| ("sophisticated updo highlighting facial features", "messy bun with loose tendrils framing face"), | |
| ("braided hairstyle with soft waves", "sleek ponytail emphasizing facial structure") | |
| ], | |
| "makeup_styles": [ | |
| ("flawless makeup with a sensual focus on lips and eyes", "perfect contouring that seductively enhances natural features"), | |
| ("smokey eyes with glossy lips expressing desire", "luminous skin with accentuated features radiating attraction"), | |
| ("professional makeup focused on highlighting allure", "natural makeup with a bold lip", "minimalist makeup emphasizing skin radiance") | |
| ], | |
| "expressions": [ | |
| ("seductive gaze full of desire", "subtle smile with a passionate gaze"), | |
| ("playful smirk with raised eyebrow and intense eye contact", "intense, elegant gaze full of desire"), | |
| ("soft gaze and subtle pleasure, lips slightly parted", "enigmatic look with a hint of a smile"), | |
| ("confident smirk with a direct, challenging gaze", "dreamy expression with eyes looking into the distance") | |
| ], | |
| "miniskirts": [ | |
| ("black leather pleated miniskirt with silver zipper", "red velvet ultra-short miniskirt with lace hem"), | |
| ("white denim tight miniskirt with distressed edges", "pink satin flared miniskirt with bow details"), | |
| ("blue plaid schoolgirl miniskirt with buttons", "green sequin shiny miniskirt with fringe"), | |
| ("purple tulle layered miniskirt with ruffles", "yellow chiffon flowy miniskirt with slits"), | |
| ("black mesh transparent miniskirt with embroidery", "red latex shiny miniskirt with buckles"), | |
| ("white lace delicate miniskirt with floral patterns", "blue denim cutoff miniskirt with pockets"), | |
| ("green velvet wrap miniskirt with ties", "pink leather high-waist miniskirt with studs"), | |
| ("purple satin asymmetric miniskirt with drape", "yellow plaid pleated miniskirt with suspenders") | |
| ], | |
| "leg_poses": [ | |
| ("legs semi-open with a slight elegant twist, softly spread to show the thong without shadows, natural and confident", "one leg delicately bent forward, toes barely touching the ground, emphasizing curve and length with visible thong"), | |
| ("knees together, feet slightly apart, toes pointing outwards for a sensual, unobstructed pose", "legs elegantly crossed but open at the thighs, foot gently pointing towards the camera, showing detailed lace"), | |
| ("standing with legs slightly apart, hips subtly turned to accentuate curves and show thong design", "seated with legs drawn to the side, elongating the figure and clearly showing the thong, seductive posture"), | |
| ("one knee on the ground, other leg extended with a slight bend, no shadows on the thong, refined pose", "legs in a gentle 's' curve, one foot resting on the knee of the other leg, thong clearly visible"), | |
| ("standing with legs close together but angled outwards, creating a subtle V-shape, hands resting on hips", "seated on the floor with legs crossed at the ankles, leaning back slightly, showing the thong") | |
| ], | |
| "camera_angles": [ | |
| ("front view with soft focus highlighting lace details", "low front angle capturing leg lines and delicate texture"), | |
| ("direct close-up focusing on hyperrealistic lace and skin", "slightly elevated front angle emphasizing an upright posture"), | |
| ("wide front shot with boudoir ambiance and soft lighting", "eye-level shot focusing on the upper body and expression"), | |
| ("dutch angle emphasizing dynamic composition", "overhead shot showcasing the outfit and pose from above") | |
| ], | |
| "photography_notes": [ | |
| "use diffused lateral light with softboxes or panels to enhance texture without harsh shadows", | |
| "avoid sharp shadows using reflectors to fill and maintain fine detail", | |
| "hands away from lingerie to avoid covering the thong, place them on thighs or skirt edge", | |
| "warm temperature with cinematic grading for an intimate and cozy atmosphere", | |
| "volumetric lighting to give depth without creating aggressive shadows", | |
| "camera set to capture front view, upright posture, and eye contact", | |
| "ensure focus is sharp on textures and details", | |
| "use a shallow depth of field to blur the background and keep focus on the subject" | |
| ] | |
| } | |
| SCENARIOS = [ | |
| "front view boudoir office scene with fully visible lace thong, model upright and elegant", | |
| "front close-up highlighting detailed lace texture, legs crossed with direct gaze", | |
| "wide front shot with focus on translucent thong and leg lines, soft diffused light", | |
| "standing pose with legs semi-open, delicate floral pattern thong visible, sensual gaze to camera", | |
| "seated at desk with elegantly crossed legs and clear thong, hands gently resting, intimate lighting", | |
| "pose highlighting legs with one knee bent forward, unobstructed thong, camera capturing front softness", | |
| "standing with crossed legs at the ankles, thong details highlighted, confident gaze to viewer" | |
| ] | |
| DESC_COMP = ( | |
| "(masterpiece, top quality:1.4), Ultra HD 16K (15360×8640), " | |
| "professional color boudoir office photography, Canon EOS R5 Cine RAW + Canon RF 85mm f/1.2L USM, " | |
| "soft diffused side light from large softbox to highlight lace texture without harsh shadows, " | |
| "cinematic grading in warm tones, vertical 9:16 aspect ratio, " | |
| "sharp and delicate details of lace and skin textures. (watermark BATUTO-ART:0.4)" | |
| ) | |
| NEGATIVE_WORDS = ( | |
| "nsfw, nude, explicit content, deformed, bad anatomy, extra limbs, " | |
| "blurry, low quality, cartoon, anime, minor, grotesque, " | |
| "poor lighting, harsh shadows, vulgar, stiff pose, distortion, hands covering lingerie" | |
| ) | |
| BOUDOIR_POSES = ( | |
| "Standing with forward leg slightly bent, lace thong delicately hinted, direct gaze, camera close to ground", | |
| "Sitting on edge of desk, one leg stretched and the other bent, lace thong subtly visible, shot from low angle", | |
| "Standing with foot resting on elevated surface, lace thong emphasized from contrapicado angle", | |
| "Leaning forward slightly, hands on thighs, lace thong hinted in low-angle shot", | |
| "Crossed forward leg, upright torso, low camera highlighting delicate lace thong texture", | |
| "Walking toward camera with lifted forward leg, lace thong faintly visible", | |
| "Lying on side, forward leg bent, lace thong suggested from upward angle", | |
| "Standing against wall with bent leg, lace thong shown strategically from contrapicado", | |
| "Sitting with legs apart slightly, low camera revealing lace thong details", | |
| "On knees, upright torso, low camera capturing lace thong from below" | |
| ) | |
| class FashionPromptGenerator: | |
| def __init__(self): | |
| self.fashion_elements = FASHION_ELEMENTS | |
| self.prompt_components = PROMPT_COMPONENTS | |
| self.scenarios = SCENARIOS | |
| self.desc_comp = DESC_COMP | |
| self.negative_words = NEGATIVE_WORDS | |
| self.boudoir_poses = BOUDOIR_POSES | |
| def generate_prompt(self, celebrity_name: str) -> str: | |
| primary_color = random.choice(self.fashion_elements["colors"]) | |
| outfit = random.choice(self.fashion_elements["outfits"]) | |
| thong_type = random.choice(self.fashion_elements["lingerie_thongs"]) | |
| bra_type = random.choice(self.fashion_elements["lingerie_bras"]) if random.random() > 0.5 else None | |
| lingerie_item_parts = [f"{primary_color} {thong_type}"] | |
| if bra_type: | |
| lingerie_item_parts.append(f"{primary_color} {bra_type}") | |
| lingerie_item = ", ".join(lingerie_item_parts) | |
| lingerie_detail = random.choice(self.fashion_elements["lingerie_details"]) | |
| stocking = f"{primary_color} {random.choice(self.fashion_elements['stockings'])}" | |
| selected_scenario = random.choice(self.scenarios) | |
| selected_lingerie_desc = random.choice(self.prompt_components["luxury_lingerie"])[0] | |
| selected_hairstyle = random.choice(self.fashion_elements["hairstyles"]) | |
| selected_makeup = random.choice(self.fashion_elements["expressions"]) | |
| selected_expression = random.choice(self.fashion_elements["expressions"]) | |
| selected_miniskirt = random.choice(self.fashion_elements["outfits"]) | |
| selected_leg_pose = random.choice(self.fashion_elements["leg_poses"]) | |
| selected_camera_angle = random.choice(self.fashion_elements["camera_angles"]) | |
| selected_boudoir_pose = random.choice(self.boudoir_poses) | |
| selected_photo_note = random.choice(self.prompt_components["photography_notes"]) | |
| selected_background = random.choice(self.fashion_elements["backgrounds"]) | |
| selected_lighting = random.choice(self.fashion_elements["lighting"]) | |
| selected_texture = random.choice(self.fashion_elements["texture_emphasis"]) | |
| prompt_core = ( | |
| f"A high-quality color photograph of the beautiful celebrity ({celebrity_name}) in a sensual boudoir moment. " | |
| f"Scenario: {selected_scenario}. " | |
| f"Pose: {selected_boudoir_pose}. " | |
| f"Clothing: {selected_miniskirt}, {lingerie_item} with {selected_lingerie_desc} and complemented by {stocking}. " | |
| f"Leg Pose: {selected_leg_pose}. " | |
| f"Hairstyle: {selected_hairstyle}. " | |
| f"Makeup: {selected_makeup}. " | |
| f"Expression: {selected_expression}. " | |
| f"Camera Angle: {selected_camera_angle}. " | |
| f"Lighting and Environment: {selected_background}, lit with {selected_lighting}. {selected_photo_note}. {selected_texture}. " | |
| f"Photography Specs: {self.desc_comp}. " | |
| f"Negative Prompt: {self.negative_words}." | |
| ) | |
| return prompt_core.strip() | |
| def generate_five_prompts(self, celebrity_name: str) -> List[str]: | |
| return [self.generate_prompt(celebrity_name) for _ in range(5)] | |
| def create_gradio_interface(): | |
| generator = FashionPromptGenerator() | |
| # Quitamos el 'theme' de aquí para que no chille el sistema | |
| with gr.Blocks(title="Fashion Prompt Generator - Office Boudoir Style") as demo: | |
| gr.Markdown("# ✨ Fashion Prompt Generator - Office Boudoir Style ✨") | |
| gr.Markdown("Enter the name of a celebrity to generate 5 unique prompts.") | |
| celebrity_input = gr.Textbox(label="Celebrity Name", placeholder="e.g., Scarlett Johansson") | |
| generate_btn = gr.Button("Generate 5 Prompts", variant="primary") | |
| prompt_outputs = [] | |
| for i in range(5): | |
| with gr.Column(): | |
| prompt_output = gr.Textbox( | |
| label=f"Prompt {i+1}", | |
| lines=10, | |
| max_lines=20, | |
| interactive=False, | |
| elem_id=f"prompt_output_{i}" | |
| # Borramos 'show_copy_button' porque no lo reconoce | |
| ) | |
| prompt_outputs.append(prompt_output) | |
| def generate_and_show(celebrity_name): | |
| if not celebrity_name.strip(): | |
| return ["Please enter a celebrity name."] * 5 | |
| prompts = generator.generate_five_prompts(celebrity_name) | |
| # El flow de los prompts sigue las reglas de BATUTO-ART | |
| formatted_prompts = [f"{prompt}" for prompt in prompts] | |
| return formatted_prompts | |
| generate_btn.click( | |
| fn=generate_and_show, | |
| inputs=celebrity_input, | |
| outputs=prompt_outputs | |
| ) | |
| return demo | |
| if __name__ == "__main__": | |
| demo = create_gradio_interface() | |
| # Aquí es donde se le mete el sazón del tema | |
| demo.launch(share=True, theme=gr.themes.Soft()) | |