Alashazam commited on
Commit
1f98777
1 Parent(s): 08e92cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -8,20 +8,20 @@ def process_prompt(prompt):
8
  image = model_interfaces(prompt)
9
  return image
10
 
11
- sandbox = gradio.Interface(
12
- fn=process_prompt,
13
- inputs=[gradio.Textbox(label="Enter Prompt:")],
14
- outputs=[gradio.Image(label="Produced Image")],
15
- title="Text to Image",
16
- examples=[["Female Adventurer portrait, rogue, tavern background"],
17
- ["female Adventurer portrait, barbarian, tavern background"],
18
- ["Magic Adventurer portrait, old wizard, tavern background"],
19
- ["Male superhero portrait, modern city, building background"],
20
- ["Magic Adventurer portrait, old wizard, fire elementalist, tavern background, fire"],
21
- ["Female Adventurer portrait, Druid, tavern background"],
22
- ["close up portrait Benedict Cumberbatch wizard of black magic, robe with hood, Hogwart University, castle tower background, oil painting on canvas"],
23
- ["Adventurer portrait, cleric, rogue looking stranger, tavern background"]]
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)