Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -65,25 +65,25 @@ css = """
|
|
65 |
"""
|
66 |
|
67 |
with gr.Blocks(theme='Nymbo/Nymbo_Theme', css=css) as app:
|
68 |
-
gr.HTML("<center><h1>FLUX.1-Dev
|
69 |
with gr.Column(elem_id="app-container"):
|
70 |
with gr.Row():
|
71 |
with gr.Column(elem_id="prompt-container"):
|
72 |
with gr.Row():
|
73 |
-
text_prompt = gr.Textbox(label="
|
74 |
with gr.Row():
|
75 |
-
with gr.Accordion("
|
76 |
-
negative_prompt = gr.Textbox(label="
|
77 |
-
steps = gr.Slider(label="
|
78 |
-
cfg = gr.Slider(label="CFG
|
79 |
-
method = gr.Radio(label="
|
80 |
-
strength = gr.Slider(label="
|
81 |
-
seed = gr.Slider(label="
|
82 |
|
83 |
with gr.Row():
|
84 |
-
text_button = gr.Button("
|
85 |
with gr.Row():
|
86 |
-
image_output = gr.Image(type="pil", label="
|
87 |
|
88 |
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength], outputs=image_output)
|
89 |
|
|
|
65 |
"""
|
66 |
|
67 |
with gr.Blocks(theme='Nymbo/Nymbo_Theme', css=css) as app:
|
68 |
+
gr.HTML("<center><h1>FLUX.1-Dev体验-By可乐君</h1></center>")
|
69 |
with gr.Column(elem_id="app-container"):
|
70 |
with gr.Row():
|
71 |
with gr.Column(elem_id="prompt-container"):
|
72 |
with gr.Row():
|
73 |
+
text_prompt = gr.Textbox(label="提示词", placeholder="在这输入提示词", lines=2, elem_id="prompt-text-input")
|
74 |
with gr.Row():
|
75 |
+
with gr.Accordion("高级设置", open=False):
|
76 |
+
negative_prompt = gr.Textbox(label="负面提示", placeholder="不想出现在照片里的元素", value="(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos", lines=3, elem_id="negative-prompt-text-input")
|
77 |
+
steps = gr.Slider(label="取样步数", value=35, minimum=1, maximum=100, step=1)
|
78 |
+
cfg = gr.Slider(label="CFG量表", value=7, minimum=1, maximum=20, step=1)
|
79 |
+
method = gr.Radio(label="取样方法", value="DPM++ 2M Karras", choices=["DPM++ 2M Karras", "DPM++ SDE Karras", "Euler", "Euler a", "Heun", "DDIM"])
|
80 |
+
strength = gr.Slider(label="强度", value=0.7, minimum=0, maximum=1, step=0.001)
|
81 |
+
seed = gr.Slider(label="种子", value=-1, minimum=-1, maximum=1000000000, step=1)
|
82 |
|
83 |
with gr.Row():
|
84 |
+
text_button = gr.Button("作图", variant='primary', elem_id="gen-button")
|
85 |
with gr.Row():
|
86 |
+
image_output = gr.Image(type="pil", label="图片输出", elem_id="gallery")
|
87 |
|
88 |
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength], outputs=image_output)
|
89 |
|