Update app.py
Browse files
app.py
CHANGED
@@ -111,16 +111,17 @@ css = """
|
|
111 |
# Interface Gradio
|
112 |
with gr.Blocks() as demo:
|
113 |
with gr.Column(elem_id="col-container"):
|
114 |
-
|
115 |
-
|
116 |
with gr.Row():
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
124 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
125 |
|
126 |
result = gr.Image(label="Result", show_label=False)
|
@@ -183,11 +184,12 @@ with gr.Blocks() as demo:
|
|
183 |
|
184 |
num_inference_steps = gr.Slider(
|
185 |
label="Number of inference steps",
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
|
|
191 |
|
192 |
gr.Examples(examples=examples, inputs=[prompt])
|
193 |
gr.on(
|
|
|
111 |
# Interface Gradio
|
112 |
with gr.Blocks() as demo:
|
113 |
with gr.Column(elem_id="col-container"):
|
114 |
+
gr.Markdown("## Text-to-Image Optimized for CPU")
|
115 |
+
|
116 |
with gr.Row():
|
117 |
+
prompt = gr.Textbox(
|
118 |
+
label="Prompt",
|
119 |
+
show_label=False,
|
120 |
+
max_lines=1,
|
121 |
+
placeholder="Enter your prompt",
|
122 |
+
container=False,
|
123 |
+
)
|
124 |
+
|
125 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
126 |
|
127 |
result = gr.Image(label="Result", show_label=False)
|
|
|
184 |
|
185 |
num_inference_steps = gr.Slider(
|
186 |
label="Number of inference steps",
|
187 |
+
minimum=1,
|
188 |
+
maximum=50, # Alterado para um máximo mais realista
|
189 |
+
step=1,
|
190 |
+
value=15, # Valor padrão ajustado
|
191 |
+
)
|
192 |
+
|
193 |
|
194 |
gr.Examples(examples=examples, inputs=[prompt])
|
195 |
gr.on(
|