Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -152,6 +152,8 @@ body {
|
|
152 |
}
|
153 |
"""
|
154 |
|
|
|
|
|
155 |
def start_generation():
|
156 |
return demo
|
157 |
|
@@ -159,7 +161,7 @@ def start_generation():
|
|
159 |
with gr.Blocks() as welcome_screen:
|
160 |
with gr.Row():
|
161 |
logo = gr.Image(
|
162 |
-
value="http://disneypixaraigenerator.com/wp-content/uploads/2023/12/cropped-android-chrome-512x512-1.png",
|
163 |
elem_id="logo",
|
164 |
height=200,
|
165 |
width=300
|
@@ -171,6 +173,9 @@ with gr.Blocks() as welcome_screen:
|
|
171 |
with gr.Row():
|
172 |
start_button = gr.Button("Get Started", variant='primary', elem_id="start-button")
|
173 |
|
|
|
|
|
|
|
174 |
# Main Generation Screen
|
175 |
with gr.Blocks(css=css) as demo:
|
176 |
with gr.Row():
|
@@ -224,8 +229,5 @@ with gr.Blocks(css=css) as demo:
|
|
224 |
|
225 |
text_button.click(flip_text, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed], outputs=image_output)
|
226 |
|
227 |
-
# Connect Welcome Screen to Generation Screen
|
228 |
-
start_button.click(fn=start_generation, outputs=demo)
|
229 |
-
|
230 |
# Launch the Gradio app
|
231 |
-
welcome_screen.launch(max_threads=128)
|
|
|
152 |
}
|
153 |
"""
|
154 |
|
155 |
+
# --- Gradio Interface ---
|
156 |
+
|
157 |
def start_generation():
|
158 |
return demo
|
159 |
|
|
|
161 |
with gr.Blocks() as welcome_screen:
|
162 |
with gr.Row():
|
163 |
logo = gr.Image(
|
164 |
+
value="http://disneypixaraigenerator.com/wp-content/uploads/2023/12/cropped-android-chrome-512x512-1.png",
|
165 |
elem_id="logo",
|
166 |
height=200,
|
167 |
width=300
|
|
|
173 |
with gr.Row():
|
174 |
start_button = gr.Button("Get Started", variant='primary', elem_id="start-button")
|
175 |
|
176 |
+
# Connect Welcome Screen to Generation Screen
|
177 |
+
start_button.click(fn=start_generation, outputs=demo)
|
178 |
+
|
179 |
# Main Generation Screen
|
180 |
with gr.Blocks(css=css) as demo:
|
181 |
with gr.Row():
|
|
|
229 |
|
230 |
text_button.click(flip_text, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed], outputs=image_output)
|
231 |
|
|
|
|
|
|
|
232 |
# Launch the Gradio app
|
233 |
+
welcome_screen.launch(max_threads=128)
|