Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,12 +2,18 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
model = gr.load("models/Purz/face-projection")
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
interface = gr.Interface(
|
| 6 |
model,
|
| 7 |
-
inputs=gr.Textbox(label="Type your imagination:"),
|
| 8 |
outputs=gr.Image(label="Gen Image"),
|
| 9 |
theme="NoCrypt/miku",
|
| 10 |
-
examples=["Humanoid Cat Warrior, Full View"]
|
| 11 |
)
|
| 12 |
|
| 13 |
interface.launch()
|
|
|
|
| 2 |
|
| 3 |
model = gr.load("models/Purz/face-projection")
|
| 4 |
|
| 5 |
+
def generate_image(text):
|
| 6 |
+
if text in examples:
|
| 7 |
+
print(f"Using example: {text}")
|
| 8 |
+
return model(text)
|
| 9 |
+
|
| 10 |
+
examples = ["Humanoid Cat Warrior, Full View"]
|
| 11 |
+
|
| 12 |
interface = gr.Interface(
|
| 13 |
model,
|
| 14 |
+
inputs=gr.Textbox(label="Type your imagination:", examples=examples),
|
| 15 |
outputs=gr.Image(label="Gen Image"),
|
| 16 |
theme="NoCrypt/miku",
|
|
|
|
| 17 |
)
|
| 18 |
|
| 19 |
interface.launch()
|