Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -64,10 +64,6 @@ def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str
|
|
64 |
negative = ""
|
65 |
return p.replace("{prompt}", positive), n + negative
|
66 |
|
67 |
-
DESCRIPTION = """## SDXL Image Generation
|
68 |
-
|
69 |
-
"""
|
70 |
-
|
71 |
if not torch.cuda.is_available():
|
72 |
DESCRIPTION += "\n<p>⚠️Running on CPU, This may not work on CPU.</p>"
|
73 |
|
@@ -203,17 +199,15 @@ footer {
|
|
203 |
}
|
204 |
'''
|
205 |
with gr.Blocks(theme="YTheme/Gradient", css=css) as demo:
|
206 |
-
gr.
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
run_button = gr.Button("Run", scale=0, variant="primary")
|
216 |
-
result = gr.Gallery(label="Result", columns=1, preview=True) # columns=1 for single image below each other if multiple
|
217 |
|
218 |
with gr.Accordion("Advanced options", open=False):
|
219 |
style_selection = gr.Dropdown( # MODIFIED: Was gr.Radio, moved into accordion
|
|
|
64 |
negative = ""
|
65 |
return p.replace("{prompt}", positive), n + negative
|
66 |
|
|
|
|
|
|
|
|
|
67 |
if not torch.cuda.is_available():
|
68 |
DESCRIPTION += "\n<p>⚠️Running on CPU, This may not work on CPU.</p>"
|
69 |
|
|
|
199 |
}
|
200 |
'''
|
201 |
with gr.Blocks(theme="YTheme/Gradient", css=css) as demo:
|
202 |
+
with gr.Row():
|
203 |
+
prompt = gr.Text(
|
204 |
+
show_label=False,
|
205 |
+
max_lines=1,
|
206 |
+
placeholder="Enter your prompt",
|
207 |
+
container=False,
|
208 |
+
)
|
209 |
+
run_button = gr.Button("Run", scale=0, variant="primary")
|
210 |
+
result = gr.Gallery(label="Result", columns=1, preview=True) # columns=1 for single image below each other if multiple
|
|
|
|
|
211 |
|
212 |
with gr.Accordion("Advanced options", open=False):
|
213 |
style_selection = gr.Dropdown( # MODIFIED: Was gr.Radio, moved into accordion
|