Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import random | |
| model = gr.load("models/Purz/face-projection") | |
| def generate_image(text, negative_prompt): | |
| return model(text, negative_prompt=negative_prompt) | |
| examples = [ | |
| ["Humanoid Cat Warrior, Full View", "No background"], | |
| ["Warhammer Sisterhood", "No weapons"], | |
| ["Future Robots war", "No destruction"], | |
| ["Fantasy dragon", "No fire"], | |
| ] | |
| interface = gr.Interface( | |
| fn=generate_image, | |
| inputs=[ | |
| gr.Textbox(label="Type here your imagination:", placeholder="Type or click an example..."), | |
| gr.Textbox(label="Negative Prompt (optional):", placeholder="Specify what to avoid..."), | |
| ], | |
| outputs=gr.Image(label="Generated Image"), | |
| examples=examples, | |
| theme="NoCrypt/miku", | |
| description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.", | |
| ) | |
| interface.launch() |