|
|
import gradio as gr |
|
|
import random |
|
|
|
|
|
|
|
|
def generate_all_prompts(name): |
|
|
|
|
|
outfits = [ |
|
|
"a form-fitting elastic cotton miniskirt and a tight short dress in red", |
|
|
"a tight short dress and a form-fitting elastic cotton miniskirt in black", |
|
|
"a leather miniskirt and a crop top in blue", |
|
|
"a denim miniskirt and a tank top in white", |
|
|
"a pleated miniskirt and a blouse in green", |
|
|
"a bodycon miniskirt and a bandeau top in pink", |
|
|
"a metallic miniskirt and a camisole in silver", |
|
|
"a lace miniskirt and a bustier in gold", |
|
|
"a PVC miniskirt and a mesh top in purple" |
|
|
] |
|
|
|
|
|
|
|
|
angles = [ |
|
|
"low angle shot looking up", |
|
|
"worm's eye view", |
|
|
"dynamic low angle" |
|
|
] |
|
|
|
|
|
|
|
|
leg_positions = [ |
|
|
"legs crossed", |
|
|
"one leg bent", |
|
|
"standing with legs slightly apart", |
|
|
"sitting with legs to the side", |
|
|
"kneeling" |
|
|
] |
|
|
|
|
|
prompts = [] |
|
|
for _ in range(3): |
|
|
|
|
|
selected_outfit = random.choice(outfits) |
|
|
selected_angle = random.choice(angles) |
|
|
selected_leg_position = random.choice(leg_positions) |
|
|
|
|
|
|
|
|
prompt = f"/imagine a photorealistic full body portrait of {name}, occupying the entire frame, extreme close-up full body shot, posing sensually and confidently, wearing {selected_outfit} with a subtly more transparent texture, high heels, elegant hairstyle with long hair, captured with a high-end DSLR camera, bright midday sun, full frame, no annoying shadows or borders, perfect lighting, park setting, high-resolution, 8k, cinematic photography, sharp focus, vibrant colors, {selected_angle}, {selected_leg_position}." |
|
|
prompts.append(prompt) |
|
|
|
|
|
|
|
|
return prompts |
|
|
|
|
|
|
|
|
css_theme = """ |
|
|
.gradio-container { |
|
|
background-color: #1a1a1a; |
|
|
color: #ffffff; |
|
|
} |
|
|
.dark .gradio-container, |
|
|
:root .dark .gradio-container { |
|
|
background-color: #1a1a1a; |
|
|
color: #ffffff; |
|
|
} |
|
|
.gradio-button { |
|
|
background-color: #dc2626; |
|
|
color: #ffffff; |
|
|
border-radius: 8px; |
|
|
border: none; |
|
|
font-weight: bold; |
|
|
} |
|
|
.gradio-button:hover { |
|
|
background-color: #ef4444; |
|
|
} |
|
|
.gradio-textbox textarea, .gradio-textbox input { |
|
|
background-color: #262626; |
|
|
color: #ffffff; |
|
|
border: 1px solid #4a4a4a; |
|
|
} |
|
|
.gradio-label { |
|
|
font-weight: bold; |
|
|
color: #ffffff; |
|
|
} |
|
|
h1 { |
|
|
color: #ef4444 !important; |
|
|
text-align: center; |
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
|
|
text-shadow: 2px 2px 4px #000000; |
|
|
} |
|
|
""" |
|
|
|
|
|
|
|
|
with gr.Blocks( |
|
|
title="🐾BATUTO_-1", |
|
|
css=css_theme |
|
|
) as demo: |
|
|
gr.Markdown( |
|
|
""" |
|
|
# 🐾BATUTO_-1 🤖✨ |
|
|
""" |
|
|
) |
|
|
with gr.Row(): |
|
|
name_input = gr.Textbox(label="Enter the celebrity's name", scale=3) |
|
|
generate_btn = gr.Button("Generate Prompt", scale=1) |
|
|
|
|
|
|
|
|
with gr.Column(): |
|
|
prompt_output = gr.Textbox(label="Generated Prompt:", lines=5, interactive=False, show_copy_button=True) |
|
|
|
|
|
|
|
|
generate_btn.click( |
|
|
fn=generate_all_prompts, |
|
|
inputs=name_input, |
|
|
outputs=prompt_output |
|
|
) |
|
|
|
|
|
if __name__ == "__main__": |
|
|
demo.launch() |