Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ css = """
|
|
| 54 |
"""
|
| 55 |
|
| 56 |
with gr.Blocks(css=css) as demo:
|
| 57 |
-
with gr.Column(elem_id="col-container"
|
| 58 |
gr.Markdown(" # Text-to-Image demo")
|
| 59 |
|
| 60 |
with gr.Row():
|
|
@@ -70,16 +70,13 @@ with gr.Blocks(css=css) as demo:
|
|
| 70 |
max_lines=1,
|
| 71 |
placeholder="Enter your prompt",
|
| 72 |
)
|
| 73 |
-
|
| 74 |
negative_prompt = gr.Textbox(
|
| 75 |
label="Negative prompt",
|
| 76 |
max_lines=1,
|
| 77 |
placeholder="Enter your negative prompt",
|
| 78 |
)
|
| 79 |
|
| 80 |
-
run_button = gr.Button("Run", scale=0, variant="primary")
|
| 81 |
-
result = gr.Image(label="Result", show_label=False)
|
| 82 |
-
|
| 83 |
with gr.Row():
|
| 84 |
seed = gr.Number(
|
| 85 |
label="Seed",
|
|
@@ -88,8 +85,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 88 |
step=1,
|
| 89 |
value=42,
|
| 90 |
)
|
| 91 |
-
|
| 92 |
-
with gr.Row():
|
| 93 |
guidance_scale = gr.Slider(
|
| 94 |
label="Guidance scale",
|
| 95 |
minimum=0.0,
|
|
@@ -107,6 +103,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 107 |
)
|
| 108 |
|
| 109 |
with gr.Accordion("Optional Settings", open=False):
|
|
|
|
| 110 |
with gr.Row():
|
| 111 |
width = gr.Slider(
|
| 112 |
label="Width",
|
|
@@ -124,7 +121,8 @@ with gr.Blocks(css=css) as demo:
|
|
| 124 |
value=1024, # Replace with defaults that work for your model
|
| 125 |
)
|
| 126 |
|
| 127 |
-
|
|
|
|
| 128 |
|
| 129 |
gr.on(
|
| 130 |
triggers=[run_button.click],
|
|
|
|
| 54 |
"""
|
| 55 |
|
| 56 |
with gr.Blocks(css=css) as demo:
|
| 57 |
+
with gr.Column(elem_id="col-container"):
|
| 58 |
gr.Markdown(" # Text-to-Image demo")
|
| 59 |
|
| 60 |
with gr.Row():
|
|
|
|
| 70 |
max_lines=1,
|
| 71 |
placeholder="Enter your prompt",
|
| 72 |
)
|
| 73 |
+
|
| 74 |
negative_prompt = gr.Textbox(
|
| 75 |
label="Negative prompt",
|
| 76 |
max_lines=1,
|
| 77 |
placeholder="Enter your negative prompt",
|
| 78 |
)
|
| 79 |
|
|
|
|
|
|
|
|
|
|
| 80 |
with gr.Row():
|
| 81 |
seed = gr.Number(
|
| 82 |
label="Seed",
|
|
|
|
| 85 |
step=1,
|
| 86 |
value=42,
|
| 87 |
)
|
| 88 |
+
|
|
|
|
| 89 |
guidance_scale = gr.Slider(
|
| 90 |
label="Guidance scale",
|
| 91 |
minimum=0.0,
|
|
|
|
| 103 |
)
|
| 104 |
|
| 105 |
with gr.Accordion("Optional Settings", open=False):
|
| 106 |
+
|
| 107 |
with gr.Row():
|
| 108 |
width = gr.Slider(
|
| 109 |
label="Width",
|
|
|
|
| 121 |
value=1024, # Replace with defaults that work for your model
|
| 122 |
)
|
| 123 |
|
| 124 |
+
run_button = gr.Button("Run", scale=0, variant="primary")
|
| 125 |
+
result = gr.Image(label="Result", show_label=False)
|
| 126 |
|
| 127 |
gr.on(
|
| 128 |
triggers=[run_button.click],
|