Spaces:
Sleeping
Sleeping
Commit ·
6e30aa4
1
Parent(s): d633848
Update app.py
Browse files
app.py
CHANGED
|
@@ -178,26 +178,16 @@ css = """
|
|
| 178 |
"""
|
| 179 |
|
| 180 |
with gr.Blocks(css=css) as demo:
|
| 181 |
-
|
| 182 |
-
favicon = '<img src="" width="48px" style="display: inline">'
|
| 183 |
-
gr.Markdown(
|
| 184 |
-
f"""<h1><center>{favicon} AI Diffusion</center></h1>
|
| 185 |
-
"""
|
| 186 |
-
)
|
| 187 |
-
|
| 188 |
-
with gr.Row(elem_id="prompt-container"):
|
| 189 |
-
current_model = gr.Dropdown(label="Current Model", choices=list_models, value=list_models[1])
|
| 190 |
-
|
| 191 |
-
with gr.Row(elem_id="prompt-container"):
|
| 192 |
-
text_prompt = gr.Textbox(label="Prompt", placeholder="a cute dog", lines=1, elem_id="prompt-text-input")
|
| 193 |
-
text_button = gr.Button("Generate", variant='primary', elem_id="gen-button")
|
| 194 |
-
|
| 195 |
with gr.Row():
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
|
|
|
|
|
|
|
|
|
| 201 |
|
| 202 |
text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
| 203 |
|
|
|
|
| 178 |
"""
|
| 179 |
|
| 180 |
with gr.Blocks(css=css) as demo:
|
| 181 |
+
gr.Markdown("# AI Diffusion")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
with gr.Row():
|
| 183 |
+
with gr.Column():
|
| 184 |
+
current_model = gr.Dropdown(label="Current Model", choices=list_models, value=list_models[1])
|
| 185 |
+
text_prompt = gr.Textbox(label="Prompt", placeholder="Enter a description of the image", lines=2)
|
| 186 |
+
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="Enter undesired elements", lines=2)
|
| 187 |
+
image_style = gr.Dropdown(label="Image Style", choices=["None", "Cinematic", "Digital Art", "Portrait"], value="None")
|
| 188 |
+
text_button = gr.Button("Generate", variant='primary')
|
| 189 |
+
with gr.Column():
|
| 190 |
+
image_output = gr.Image(type="pil", label="Output Image")
|
| 191 |
|
| 192 |
text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
| 193 |
|