Spaces:
Build error
Build error
import gradio as gr | |
def main(gender, age, height, body, Style, boobsize, asssize, skin, hair, hairstyle, eyes, tops, bottoms): | |
stringgg = "" | |
if Style != "None": | |
# "None", "Realistic", "Anime", "Photo", "selfie" | |
if Style == "Realistic": | |
stringgg += "Realistic, realism, " | |
elif Style == "Anime": | |
stringgg += "amime style, " | |
elif Style == "Photo": | |
stringgg += "pic, photo, " | |
elif Style == "selfie": | |
stringgg += "Selfie, " | |
stringgg += str(gender)+", " | |
stringgg += str(age)+" years old, " | |
stringgg += str(height)+"ft, " | |
stringgg += str(body)+", " | |
stringgg += str(hair)+" hair color, " | |
stringgg += str(hairstyle)+" hair style, " | |
stringgg += str(eyes)+" eyes, " | |
if tops != "None": | |
stringgg += str(tops)+", " | |
if bottoms != "None": | |
stringgg += str(bottoms)+", " | |
if tops == "None" and bottoms == "None": | |
stringgg += " Nude, " | |
stringgg += str(skin)+" skin tone, " | |
if boobsize != "None": | |
stringgg += str(boobsize)+" cup size, " | |
if asssize != "None": | |
stringgg += str(asssize)+" butt size" | |
print(stringgg) | |
return stringgg | |
gender = gr.inputs.Radio(["female", "male"], default="female") | |
age = gr.inputs.Slider(minimum=0, maximum=100, default=25, label="Age") | |
height = gr.inputs.Slider(minimum=1, maximum=10, default=5, label="Height") | |
# body stlye | |
with open('attributes/body.txt') as f: | |
body = f.read().splitlines() | |
body = gr.inputs.Radio(body, default="slim", label="Body Style") | |
Style = gr.inputs.Radio(["None", "Realistic", "Anime", "Photo", "selfie"], default="None", label="Style") | |
# boob size | |
with open('attributes/boobsize.txt') as f: | |
boobsize = f.read().splitlines() | |
boobsize = gr.inputs.Dropdown(boobsize, default="None", label="Boobe Size") | |
# ass size | |
with open('attributes/asssize.txt') as f: | |
asssize = f.read().splitlines() | |
asssize = gr.inputs.Dropdown(asssize, default="None", label="Ass Size") | |
#skin color | |
with open('attributes/skin.txt') as f: | |
skin = f.read().splitlines() | |
skin = gr.inputs.Dropdown(skin, default="White", label="Skin Tone") | |
# hair color | |
with open('attributes/haircolor.txt') as f: | |
hair = f.read().splitlines() | |
hair = gr.inputs.Dropdown(hair, default="Blonde", label="Hair Color") | |
# hair style | |
with open('attributes/hairstyle.txt') as f: | |
hairstyle = f.read().splitlines() | |
hairstyle = gr.inputs.Dropdown(hairstyle, default="Bob", label="Hair Style") | |
# eye color | |
with open('attributes/eyecolor.txt') as f: | |
eyes = f.read().splitlines() | |
eyes = gr.inputs.Dropdown(eyes, default="Blue", label="Eye Color") | |
# tops | |
with open('attributes/top.txt') as f: | |
top = f.read().splitlines() | |
tops = gr.inputs.Dropdown(top, default="None", label="Tops") | |
# bottoms | |
with open('attributes/bottoms.txt') as f: | |
bottom = f.read().splitlines() | |
bottoms = gr.inputs.Dropdown(bottom, default="None", label="Bottoms") | |
gr.Interface(main, [gender, age, height, body, Style, boobsize, asssize, skin, hair, hairstyle, eyes, tops, bottoms], "text").launch() |