# app.py import gradio as gr #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ BATUTO-bot (refined version) This script generates prompts for professional color photographs capturing a famous and beautiful celebrity in a provocative yet elegant moment, with subtle hints of lace bikini-style thong lingerie during an everyday activity. The focus is on seduction, natural poses, and professional studio photography. """ import secrets import datetime from enum import Enum from dataclasses import dataclass from typing import List, Dict, Any, Optional import gradio as gr # ---------------------------------------------------------------------- # -------------------------- ENUMS & DATACLASSES ----------------------- # ---------------------------------------------------------------------- class ColorPalette(Enum): SCARLET_RED = "#FF2400" PEARL_WHITE = "#FFFFFF" MIDNIGHT_BLUE = "#082567" @classmethod def random_color(cls, exclude: List[str] = None) -> str: colors = list(cls) if exclude: colors = [c for c in colors if c.name not in exclude] choice = secrets.choice(colors) return f"{choice.name.replace('_', ' ').title()} ({choice.value})" @dataclass class LingerieDesign: name: str color: str bra: str thong: str stockings: str garter: Optional[str] class LingerieDesigns: BASE_DESIGNS: List[LingerieDesign] = [ LingerieDesign( "Delicate Elegance", "Pearl White", "light, transparent lace bra with subtle floral embroidery", "lace bikini-style thong with delicate transparencies and intricate details", "thigh-high lace stockings with fine floral patterns", "delicate adjustable garter belt with satin accents", ), LingerieDesign( "Midnight Seduction", "Midnight Blue", "semi-sheer lace bra with elegant scalloped edges", "lace bikini-style thong with sensual transparencies and high-cut design", "thigh-high lace stockings with subtle geometric lace patterns", None, ), ] @classmethod def random_base_design(cls) -> LingerieDesign: return secrets.choice(cls.BASE_DESIGNS) class CameraAngles(Enum): FRONTAL_SUBTLE = ("Frontal Subtle", "A strategic frontal angle capturing the figure naturally") SIDE_PROFILE = ("Side Profile", "A soft side angle emphasizing curves and textures") THREE_QUARTER = ("Three-Quarter", "A 45° angle highlighting elegance and movement") @classmethod def random_angle(cls): return secrets.choice(list(cls)) class StyleElements: HAIR = ["long, glossy loose waves with elegant dye", "sleek updo with soft curls", "flowing layered hair with natural shine"] EVERYDAY_ACTIVITIES = [ "adjusting a silk scarf in a luxurious penthouse", "sipping coffee in a Parisian loft with golden sunlight", "reaching for a book in an intimate library setting", ] OUTERWEAR = [ "a semi-sheer silk blouse with delicate buttons", "a flowing chiffon dress with a subtle slit", "a tailored blazer with a plunging neckline", ] @classmethod def random_style(cls) -> Dict[str, str]: return { "hair": secrets.choice(cls.HAIR), "activity": secrets.choice(cls.EVERYDAY_ACTIVITIES), "outerwear": secrets.choice(cls.OUTERWEAR), } # ---------------------------------------------------------------------- # --------------------- PROMPT BUILDERS -------------------------------- # ---------------------------------------------------------------------- def build_prompt_professional( model_name: str, design: LingerieDesign, style: Dict[str, str], angle: CameraAngles, ) -> str: intros = [ f"{model_name}, a famous and beautiful celebrity, captured in a provocative yet elegant moment.", f"{model_name} exudes seduction in a natural, everyday scene, with subtle hints of luxury.", f"A stunning {model_name} in a professional photoshoot, radiating desire and elegance.", ] intro = secrets.choice(intros) hair_activity = f"Her hair styled in {style['hair']}, while {style['activity']}." outerwear = f"She wears {style['outerwear']}, which subtly reveals hints of her {design.thong} through a natural movement." lingerie_details = ( f"The lingerie set includes {design.bra}, {design.thong} with sensual lace transparencies, " f"and {design.stockings}. {design.garter if design.garter else ''}" ) angle_text = f"Captured from a {angle.value[0].lower()} angle, emphasizing the texture and details of the lace." photography_specs = ( "Ultra HD 16K (15360x8640) RAW photo, shot with Canon EOS R5 Cine RAW, Canon RF 85mm f/1.2L USM lens. " "Lit by ARRI SkyPanel S360-C, with perfect depth of field and no shadows. " "Color graded in DaVinci Resolve for flawless skin and fabric textures. " "Signed 'BATUTO-ART' in the lower right corner (3% of image size)." ) visual_rules = ( "The frame is fully occupied by her figure, with no distracting edges or designs. " "Professional lighting highlights skin and lace textures without overexposure, " "focusing precisely on the area where the thong is subtly hinted at. " "She gazes at the viewer with desire, her gestures exuding seduction in a natural pose." ) return f"{intro} {hair_activity} {outerwear} {lingerie_details} {angle_text} {photography_specs} {visual_rules}" def build_multiple_scenes_professional(model_name: str, count: int = 3) -> List[str]: return [ build_prompt_professional( model_name, LingerieDesigns.random_base_design(), StyleElements.random_style(), CameraAngles.random_angle(), ) for _ in range(count) ] # ---------------------------------------------------------------------- # --------------------- GRADIO LOGIC (simplified) ---------------------- # ---------------------------------------------------------------------- def generate_and_display_prompts(model_name: str, num_prompts: int): """ Callback used by the Gradio button. Generates 'num_prompts' prompts and returns a Markdown with the results. """ try: if not model_name or not model_name.strip(): return "⚠️ Please enter a valid model name." num = int(round(num_prompts)) prompts = build_multiple_scenes_professional(model_name, num) output_md = "" for idx, prmpt in enumerate(prompts, start=1): output_md += ( f"### Prompt {idx}\n" f"```\n{prmpt}\n```\n\n" "---\n" ) return output_md except Exception as exc: return f"❌ Unexpected error: {exc}" # ---------------------------------------------------------------------- # --------------------- GRADIO INTERFACE ------------------------------- # ---------------------------------------------------------------------- with gr.Blocks(title="BATUTO-bot") as demo: gr.Markdown("# BATUTO-bot") gr.Markdown("Generates AI prompts for professional, seductive photoshoot images with subtle lingerie hints.") with gr.Row(): model_name_input = gr.Textbox( label="Model Name", placeholder="E.g., Ariana Grande", lines=1, ) num_prompts_input = gr.Slider( minimum=1, maximum=5, value=3, step=1, label="Number of Prompts to Generate", ) generate_button = gr.Button("Generate Prompts") gr.Markdown("## Generated Prompts") output_container = gr.Markdown() generate_button.click( fn=generate_and_display_prompts, inputs=[model_name_input, num_prompts_input], outputs=output_container, ) # Permite que la llamada a la API no bloquee la UI demo.queue() if __name__ == "__main__": demo.launch()