Spaces:
Running
on
Zero
Running
on
Zero
prithivMLmods
commited on
Commit
•
57709d9
1
Parent(s):
b2d039c
Update app.py
Browse files
app.py
CHANGED
@@ -122,6 +122,7 @@ footer {
|
|
122 |
visibility: hidden
|
123 |
}
|
124 |
'''
|
|
|
125 |
with gr.Blocks(css=css, theme="prithivMLmods/Minecraft-Theme") as demo:
|
126 |
gr.Markdown(DESCRIPTIONx)
|
127 |
with gr.Row():
|
@@ -136,75 +137,82 @@ with gr.Blocks(css=css, theme="prithivMLmods/Minecraft-Theme") as demo:
|
|
136 |
result = gr.Image(label="Result", show_label=False)
|
137 |
|
138 |
with gr.Row(visible=True):
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
|
145 |
with gr.Row(visible=True):
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
|
155 |
with gr.Accordion("Advanced Settings", open=False):
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
)
|
162 |
|
163 |
-
|
164 |
-
label="
|
165 |
-
minimum=
|
166 |
-
maximum=
|
167 |
-
step=
|
168 |
-
value=
|
169 |
)
|
170 |
|
171 |
-
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
172 |
-
|
173 |
with gr.Row():
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
height = gr.Slider(
|
183 |
-
label="Height",
|
184 |
-
minimum=512,
|
185 |
-
maximum=MAX_IMAGE_SIZE,
|
186 |
-
step=32,
|
187 |
-
value=1024,
|
188 |
-
)
|
189 |
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
)
|
198 |
-
|
199 |
-
num_inference_steps = gr.Slider(
|
200 |
-
label="Number of inference steps",
|
201 |
-
minimum=1,
|
202 |
-
maximum=50,
|
203 |
-
step=1,
|
204 |
-
value=4,
|
205 |
-
)
|
206 |
|
207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
gr.on(
|
210 |
triggers=[run_button.click, prompt.submit],
|
|
|
122 |
visibility: hidden
|
123 |
}
|
124 |
'''
|
125 |
+
|
126 |
with gr.Blocks(css=css, theme="prithivMLmods/Minecraft-Theme") as demo:
|
127 |
gr.Markdown(DESCRIPTIONx)
|
128 |
with gr.Row():
|
|
|
137 |
result = gr.Image(label="Result", show_label=False)
|
138 |
|
139 |
with gr.Row(visible=True):
|
140 |
+
grid_size_selection = gr.Dropdown(
|
141 |
+
choices=["2x1", "1x2", "2x2", "2x3", "3x2", "1x1"],
|
142 |
+
value="1x1",
|
143 |
+
label="Grid Size"
|
144 |
+
)
|
145 |
|
146 |
with gr.Row(visible=True):
|
147 |
+
style_selection = gr.Radio(
|
148 |
+
show_label=True,
|
149 |
+
container=True,
|
150 |
+
interactive=True,
|
151 |
+
choices=STYLE_NAMES,
|
152 |
+
value=DEFAULT_STYLE_NAME,
|
153 |
+
label="Quality Style",
|
154 |
+
)
|
155 |
|
156 |
with gr.Accordion("Advanced Settings", open=False):
|
157 |
+
negative_prompt = gr.Text(
|
158 |
+
label="Negative prompt",
|
159 |
+
max_lines=1,
|
160 |
+
placeholder="Enter a negative prompt",
|
161 |
+
visible=False,
|
162 |
+
)
|
163 |
+
|
164 |
+
seed = gr.Slider(
|
165 |
+
label="Seed",
|
166 |
+
minimum=0,
|
167 |
+
maximum=MAX_SEED,
|
168 |
+
step=1,
|
169 |
+
value=0,
|
170 |
+
)
|
171 |
+
|
172 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
173 |
+
|
174 |
+
with gr.Row():
|
175 |
+
width = gr.Slider(
|
176 |
+
label="Width",
|
177 |
+
minimum=512,
|
178 |
+
maximum=MAX_IMAGE_SIZE,
|
179 |
+
step=32,
|
180 |
+
value=1024,
|
181 |
)
|
182 |
|
183 |
+
height = gr.Slider(
|
184 |
+
label="Height",
|
185 |
+
minimum=512,
|
186 |
+
maximum=MAX_IMAGE_SIZE,
|
187 |
+
step=32,
|
188 |
+
value=1024,
|
189 |
)
|
190 |
|
|
|
|
|
191 |
with gr.Row():
|
192 |
+
guidance_scale = gr.Slider(
|
193 |
+
label="Guidance scale",
|
194 |
+
minimum=0.0,
|
195 |
+
maximum=7.5,
|
196 |
+
step=0.1,
|
197 |
+
value=0.0,
|
198 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
+
num_inference_steps = gr.Slider(
|
201 |
+
label="Number of inference steps",
|
202 |
+
minimum=1,
|
203 |
+
maximum=50,
|
204 |
+
step=1,
|
205 |
+
value=4,
|
206 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
+
gr.Examples(
|
209 |
+
examples=examples,
|
210 |
+
inputs=[prompt],
|
211 |
+
outputs=[result, seed],
|
212 |
+
fn=infer,
|
213 |
+
cache_examples=True,
|
214 |
+
cache_mode="lazy"
|
215 |
+
)
|
216 |
|
217 |
gr.on(
|
218 |
triggers=[run_button.click, prompt.submit],
|