Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import os | |
| sex_value = "" | |
| age_value = 0 | |
| def prompt(user_upload, name, sex_value, age_value): | |
| if sex_value == "male": | |
| sex = "man" | |
| elif sex_value == "female": | |
| sex = "women" | |
| else: | |
| sex = "nutral person" | |
| return "RAW photo, VAR TRIGGERWORD, photo a " + sex + ",wearing a suit, " + str(age_value) + " years old,standing on a huge stage, energetic pose, wide shot, huge american flag in background, stage lighting --n (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation", name | |
| demo = gr.Interface( | |
| fn=prompt, | |
| inputs=[ | |
| gr.Files(label="upload 10 pics", file_count="multiple", file_types=["image", ".jpg"]), | |
| gr.Textbox(label="name"), | |
| gr.Radio(["male", "female", "none binary"], label="sex"), | |
| gr.Slider(18, 99, step=1, label="age") | |
| ], | |
| outputs=[ | |
| gr.Textbox(label="prompt"), | |
| gr.Textbox(label="name"), | |
| ] | |
| ) | |
| demo.launch() | |