Spaces:
Sleeping
Sleeping
File size: 1,215 Bytes
f8f36fb be8e666 f8f36fb 3757dc8 be8e666 3757dc8 be8e666 |
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 |
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()
|