charliebaby2023 commited on
Commit
ac8d418
โ€ข
1 Parent(s): 19a6ee2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py CHANGED
@@ -100,6 +100,30 @@ def make_me():
100
  )
101
 
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  with gr.Blocks() as demo:
104
  make_me()
105
 
 
100
  )
101
 
102
 
103
+ with gr.Blocks(theme="miittnnss/green", title="Play with Stable Diffusion Models") as playground:
104
+ gr.HTML(
105
+ """
106
+ <div style="text-align: center; margin: 0 auto;">
107
+ <div style="display: inline-flex; align-items: center; gap: 0.8rem; font-size: 1.75rem;">
108
+ <h1 style="font-weight: 900; margin-bottom: 7px; margin-top: 5px;">๐ŸŽจ๐Ÿค– Play with SD Models</h1>
109
+ </div>
110
+ <p style="margin-bottom: 10px; font-size: 94%; line-height: 23px;">
111
+ Explore and create your AI art with Stable Diffusion models!
112
+ </p>
113
+ </div>
114
+ """
115
+ )
116
+
117
+ with gr.Row():
118
+ image_output = gr.Image(type="pil", label="Output Image", elem_id="gallery")
119
+ with gr.Column(elem_id="prompt-container"):
120
+ text_prompt = gr.Textbox(label="Prompt", placeholder="a cute cat", lines=1, elem_id="prompt-text-input")
121
+ model_dropdown = gr.Dropdown(label="Model", choices=MODEL_LIST, elem_id="model-dropdown", value="runwayml/stable-diffusion-v1-5")
122
+ gen_button = gr.Button("Generate", variant='primary', elem_id="gen-button")
123
+
124
+ with gr.Accordion("Advanced settings", open=False):
125
+ negative_prompt = gr.Textbox(label="Negative Prompt", value="text, blurry, fuzziness", lines=1, elem_id="negative-prompt-text-input")
126
+
127
  with gr.Blocks() as demo:
128
  make_me()
129