# app.py # ====================================================================== # --- 1. Importaciones de Bibliotecas --- # ====================================================================== import gradio as gr import os import random # ====================================================================== # --- 2. Datos para Combinaciones Dinámicas --- # ====================================================================== BRA_STYLES = [ "a light and transparent lace bra", "a sheer balcony bra with delicate lace details", "a push-up bra with intricate lace overlay", "an unlined lace bralette", "a seamless sheer bra with minimalist design", "a silk and lace demi-cup bra" ] THONG_COLORS = [ "black", "red", "white", "cream", "burgundy", "champagne", "dark blue", "deep purple", "silver", "gold" ] THIGH_HIGH_STOCKINGS = [ "thigh-high silk stockings with perfect details", "sheer black stockings with a delicate lace top", "seamless nude hosiery with perfect details", "fishnet tights that reach her thighs", "back-seam stockings with a lace garter" ] EVERYDAY_ACTIVITIES = [ "performing an everyday activity like picking up a book", "performing an everyday activity like adjusting her hair in a mirror", "performing an everyday activity like reaching for a wine glass", "performing an everyday activity like bending over to tie a shoe", "performing an everyday activity like organizing papers on a desk" ] HAIR_STYLES = [ "long elegant hair styled with a refined arrangement", "long, sleek straight hair", "soft, voluminous curls", "a sophisticated chignon", "a half-up half-down style" ] HAIR_COLORS = [ "vibrant chestnut brown", "platinum blonde", "raven black", "auburn", "honey blonde", "chocolate brown" ] EXPRESSIONS = [ "desire and seduction", "a knowing, seductive gaze", "a playful look full of desire", "an intense, seductive stare", "a dreamy expression of desire" ] # ====================================================================== # --- 3. Funciones de Lógica de la Aplicación --- # ====================================================================== def generate_prompt(celebrity_name: str) -> str: if not celebrity_name.strip(): return "Please enter a valid celebrity name." activity = random.choice(EVERYDAY_ACTIVITIES) thong_color = random.choice(THONG_COLORS) thigh_highs = random.choice(THIGH_HIGH_STOCKINGS) bra = random.choice(BRA_STYLES) hair_style = random.choice(HAIR_STYLES) hair_color = random.choice(HAIR_COLORS) expression = random.choice(EXPRESSIONS) prompt = ( f"The renowned celebrity {celebrity_name} is captured full-body in a professional, " f"high-resolution color photograph, conveying elegance and sensuality through natural, everyday movement " f"that hints subtly at her lace thong. The composition, in Ultra HD 16K format (15360 × 8640), " f"was shot with a Canon EOS R5 Cine RAW camera and a Canon RF 85mm f/1.2L USM lens, presenting a low-angle frontal perspective " f"emphasizing her full figure without distractions. The scene is lit with an ARRI SkyPanel S360-C panel, providing professional, shadow-free light, " f"highlighting the textures of skin and delicate fabrics while maintaining balanced exposure.\n\n" f"The celebrity's outfit consists of the meticulously designed peeking G-string, intricately detailed thigh-high stockings, and a lace bra, " f"subtly suggested by a natural pose that communicates spontaneous sophistication. Complemented by {hair_style} styled with a refined arrangement " f"and a vibrant {hair_color} hue. Her expression reflects {expression}, looking directly at the viewer with desire and pleasure.\n\n" f"The overall composition maintains a harmonious balance, with professional lighting emphasizing the peeking lace G-string and the outfit without overexposure. " f"The photograph achieves perfect depth of field with sharp focus and softly blurred background, eliminating distractions. " f"Post-processed with expert color grading in DaVinci Resolve, this image exudes cinematic quality.\n\n" f"Ultra HD 16K (15360x8640) | RAW photo | Canon EOS R5 Cine RAW | Canon RF 85mm f/1.2L USM lens | ARRI SkyPanel S360-C lighting | " f"Perfect depth of field | Professional studio photography without shadows | Color grading in DaVinci Resolve." ) return prompt # ====================================================================== # --- 4. Construcción de la Interfaz Gradio --- # ====================================================================== title_html = """
m: (0.1 subtle discretion)
""" with gr.Blocks(theme=gr.themes.Monochrome()) as demo: gr.HTML(title_html) name_input = gr.Textbox(label="Enter celebrity name:", placeholder="e.g. Scarlett Johansson") generate_btn = gr.Button("Generate Prompt") prompt_output = gr.Textbox( label="Generated Prompt", lines=10, interactive=False, info="Mantén pulsado el texto para copiarlo en tu móvil Android." ) # Sólo conecta el botón de generación, sin copiar generate_btn.click(fn=generate_prompt, inputs=name_input, outputs=prompt_output) # ====================================================================== # --- 5. Configuración para el Despliegue y Ejecución Local --- # ====================================================================== port = int(os.environ.get('PORT', 7860)) if __name__ == "__main__": demo.launch(server_name="0.0.0.0", server_port=port)