File size: 8,121 Bytes
a1cbe21 fa5d4ae a1cbe21 fa5d4ae a1cbe21 fa5d4ae a1cbe21 fa5d4ae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# 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() |