Text-to-Image / app.py
Jonny001's picture
Update app.py
9b4118a verified
raw
history blame
661 Bytes
import gradio as gr
import random
model = gr.load("models/Purz/face-projection")
def generate_image(text, seed):
if seed is not None:
random.seed(seed)
if text in [example[0] for example in examples]:
print(f"Using example: {text}")
return model(text)
examples = [
["Humanoid Cat Soldier, Full View"]
]
interface = gr.Interface(
fn=generate_image,
inputs=[
gr.Textbox(label="Type here your imagination:"),
gr.Slider(minimum=0, maximum=10000, step=1, label="Seed (optional)")
],
outputs=gr.Image(label="Generated Image"),
examples=examples,
theme="NoCrypt/miku",
)
interface.launch()