Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,20 +8,20 @@ def process_prompt(prompt):
|
|
| 8 |
image = model_interfaces(prompt)
|
| 9 |
return image
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
sandbox.queue(concurrency_count=10).launch(debug=True)
|
| 27 |
-
#gr.Interface.load().launch()
|
|
|
|
| 8 |
image = model_interfaces(prompt)
|
| 9 |
return image
|
| 10 |
|
| 11 |
+
with gradio.Blocks(theme=gr.themes.Soft()) as sandbox:
|
| 12 |
+
sandbox = gradio.Interface(
|
| 13 |
+
fn=process_prompt,
|
| 14 |
+
inputs=[gradio.Textbox(label="Enter Prompt:")],
|
| 15 |
+
outputs=[gradio.Image(label="Produced Image")],
|
| 16 |
+
title="Text to Image",
|
| 17 |
+
examples=[["Female Adventurer portrait, rogue, tavern background"],
|
| 18 |
+
["female Adventurer portrait, barbarian, tavern background"],
|
| 19 |
+
["Magic Adventurer portrait, old wizard, tavern background"],
|
| 20 |
+
["Male superhero portrait, modern city, building background"],
|
| 21 |
+
["Magic Adventurer portrait, old wizard, fire elementalist, tavern background, fire"],
|
| 22 |
+
["Female Adventurer portrait, Druid, tavern background"],
|
| 23 |
+
["close up portrait Benedict Cumberbatch wizard of black magic, robe with hood, Hogwart University, castle tower background, oil painting on canvas"],
|
| 24 |
+
["Adventurer portrait, cleric, rogue looking stranger, tavern background"]]
|
| 25 |
+
)
|
| 26 |
|
| 27 |
sandbox.queue(concurrency_count=10).launch(debug=True)
|
|
|