Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,33 @@ def query(prompt, is_negative=False, steps=30, cfg_scale=7, sampler="DPM++ 2M Ka
|
|
63 |
def clear_prompt(prompt):
|
64 |
return ""
|
65 |
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
gr.HTML("""
|
68 |
<h1 align="center">Dream Generator with Flux</h1>
|
69 |
<h2 align="center">Transforma tus sue帽os en im谩genes vibrantes con un solo clic.</h2>
|
@@ -72,11 +98,6 @@ with gr.Blocks() as app:
|
|
72 |
with gr.Row():
|
73 |
with gr.Column(scale=1):
|
74 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Enter a prompt here", lines=2, elem_id="prompt-text-input")
|
75 |
-
with gr.Row():
|
76 |
-
with gr.Column(scale=1):
|
77 |
-
clear_button = gr.Button("Clear", elem_id="clear-button", variant="secondary")
|
78 |
-
with gr.Column(scale=1):
|
79 |
-
generate_button = gr.Button("Generate", elem_id="generate-button", variant="primary")
|
80 |
with gr.Accordion("Advanced Settings", open=False):
|
81 |
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="What should not be in the image", 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")
|
82 |
steps = gr.Slider(label="Sampling steps", value=35, minimum=1, maximum=100, step=1)
|
@@ -85,6 +106,12 @@ with gr.Blocks() as app:
|
|
85 |
strength = gr.Slider(label="Strength", value=0.7, minimum=0, maximum=1, step=0.001)
|
86 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1)
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
with gr.Column(scale=1):
|
89 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
90 |
|
|
|
63 |
def clear_prompt(prompt):
|
64 |
return ""
|
65 |
|
66 |
+
css = """
|
67 |
+
h1 {
|
68 |
+
color: #f28f8f; /* Color para el encabezado h1 */
|
69 |
+
}
|
70 |
+
|
71 |
+
h2 {
|
72 |
+
color: #f28f8f; /* Color para el encabezado h2 */
|
73 |
+
}
|
74 |
+
|
75 |
+
button.primary {
|
76 |
+
background-color: #28a745; /* Color verde para el bot贸n Generate */
|
77 |
+
color: #ffffff; /* Texto blanco en el bot贸n */
|
78 |
+
border: 1px solid #28a745; /* Borde verde para el bot贸n */
|
79 |
+
}
|
80 |
+
|
81 |
+
button.primary:hover {
|
82 |
+
background-color: #218838; /* Verde oscuro en hover */
|
83 |
+
}
|
84 |
+
|
85 |
+
button.secondary {
|
86 |
+
background-color: #f0f0f0; /* Color de fondo para el bot贸n Clear */
|
87 |
+
color: #333333; /* Texto gris oscuro en el bot贸n */
|
88 |
+
border: 1px solid #cccccc; /* Borde gris claro para el bot贸n */
|
89 |
+
}
|
90 |
+
"""
|
91 |
+
|
92 |
+
with gr.Blocks(css=css) as app:
|
93 |
gr.HTML("""
|
94 |
<h1 align="center">Dream Generator with Flux</h1>
|
95 |
<h2 align="center">Transforma tus sue帽os en im谩genes vibrantes con un solo clic.</h2>
|
|
|
98 |
with gr.Row():
|
99 |
with gr.Column(scale=1):
|
100 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Enter a prompt here", lines=2, elem_id="prompt-text-input")
|
|
|
|
|
|
|
|
|
|
|
101 |
with gr.Accordion("Advanced Settings", open=False):
|
102 |
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="What should not be in the image", 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")
|
103 |
steps = gr.Slider(label="Sampling steps", value=35, minimum=1, maximum=100, step=1)
|
|
|
106 |
strength = gr.Slider(label="Strength", value=0.7, minimum=0, maximum=1, step=0.001)
|
107 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1)
|
108 |
|
109 |
+
with gr.Row(): # Fila para los botones
|
110 |
+
with gr.Column(scale=1, elem_id="button-container"):
|
111 |
+
clear_button = gr.Button("Clear", elem_id="clear-button", variant="secondary")
|
112 |
+
with gr.Column(scale=1, elem_id="button-container"):
|
113 |
+
generate_button = gr.Button("Generate", elem_id="generate-button", variant="primary")
|
114 |
+
|
115 |
with gr.Column(scale=1):
|
116 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
117 |
|