Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -170,20 +170,20 @@ with gr.Blocks(css=css) as demo:
|
|
170 |
|
171 |
with gr.Row():
|
172 |
with gr.Column():
|
173 |
-
gr.Markdown("<h1
|
174 |
-
current_model = gr.Dropdown(label="
|
175 |
-
text_prompt = gr.Textbox(label="
|
176 |
-
generate_button = gr.Button("
|
177 |
|
178 |
with gr.Column():
|
179 |
gr.Markdown("<h4>Advanced Settings</h4>")
|
180 |
with gr.Accordion("Advanced Customizations", open=False):
|
181 |
-
negative_prompt = gr.Textbox(label="
|
182 |
-
image_style = gr.Dropdown(label="
|
183 |
# Add more options if needed
|
184 |
|
185 |
with gr.Row():
|
186 |
-
image_output = gr.Image(type="pil", label="
|
187 |
|
188 |
generate_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
189 |
|
|
|
170 |
|
171 |
with gr.Row():
|
172 |
with gr.Column():
|
173 |
+
gr.Markdown("<h1>模多多Stable Diffusion文生图大模型</h1>")
|
174 |
+
current_model = gr.Dropdown(label="选择模型", choices=list_models, value=list_models[1])
|
175 |
+
text_prompt = gr.Textbox(label="输入提示", placeholder="Example: a cute dog", lines=2)
|
176 |
+
generate_button = gr.Button("生成图像", variant='primary')
|
177 |
|
178 |
with gr.Column():
|
179 |
gr.Markdown("<h4>Advanced Settings</h4>")
|
180 |
with gr.Accordion("Advanced Customizations", open=False):
|
181 |
+
negative_prompt = gr.Textbox(label="否定提示(可选)", placeholder="Example: blurry, unfocused", lines=2)
|
182 |
+
image_style = gr.Dropdown(label="选择风格", choices=["None style", "Cinematic", "Digital Art", "Portrait"], value="None style")
|
183 |
# Add more options if needed
|
184 |
|
185 |
with gr.Row():
|
186 |
+
image_output = gr.Image(type="pil", label="图像输出")
|
187 |
|
188 |
generate_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
189 |
|