HelloAI1 commited on
Commit
0718612
·
verified ·
1 Parent(s): 7a1f2b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -1
app.py CHANGED
@@ -152,6 +152,26 @@ body {
152
  }
153
  """
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  with gr.Blocks(css=css) as demo:
156
  with gr.Row():
157
  gr.Markdown("<h1 style='text-align: center;'>Create Your Disney Pixar AI Poster</h1>", elem_id="title")
@@ -204,4 +224,8 @@ with gr.Blocks(css=css) as demo:
204
 
205
  text_button.click(flip_text, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed], outputs=image_output)
206
 
207
- demo.queue(concurrency_count=24, max_size=32, api_open=False).launch(max_threads=128)
 
 
 
 
 
152
  }
153
  """
154
 
155
+ def start_generation():
156
+ return demo
157
+
158
+ # Initial Welcome Screen
159
+ with gr.Blocks() as welcome_screen:
160
+ with gr.Row():
161
+ gr.Image(
162
+ value="https://i.ibb.co/9Y3gZ7S/Pixar-Logo.png", # Replace with your logo URL
163
+ elem_id="logo",
164
+ height=200,
165
+ width=300
166
+ )
167
+
168
+ with gr.Row():
169
+ gr.Markdown("<h1 style='text-align: center;'>Disney Pixar AI Generator</h1>", elem_id="title")
170
+
171
+ with gr.Row():
172
+ 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():
177
  gr.Markdown("<h1 style='text-align: center;'>Create Your Disney Pixar AI Poster</h1>", elem_id="title")
 
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
+ welcome_screen.button("start-button").click(fn=start_generation, outputs=demo)
229
+
230
+ # Launch the Gradio app
231
+ welcome_screen.launch(max_threads=128)