GabrielSalem commited on
Commit
94f4e7c
·
verified ·
1 Parent(s): f3afd25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -24
app.py CHANGED
@@ -152,39 +152,32 @@ h1 {
152
  background: #e64a19;
153
  }
154
  '''
155
-
156
  with gr.Blocks(css=css) as demo:
157
  gr.Markdown("# Image Generation with Face ID")
158
  gr.Markdown("Upload your face images and enter a prompt to generate images.")
159
 
160
- with gr.Row():
161
- with gr.Column():
162
- images_input = gr.Files(
163
- label="Drag 1 or more photos of your face",
164
- file_types=["image"]
165
- )
166
- gender_input = gr.Radio(
167
- label="Select Gender",
168
- choices=["Female", "Male"],
169
- value="Female",
170
- type="value"
171
- )
172
- prompt_input = gr.Textbox(
173
- label="Enter your prompt",
174
- placeholder="Describe the image you want to generate..."
175
- )
176
- run_button = gr.Button("Generate Image")
177
-
178
- with gr.Column():
179
- output_gallery = gr.Gallery(label="Generated Images")
180
-
181
- # Define the event handler for the button click
182
  run_button.click(
183
  fn=generate_image,
184
  inputs=[images_input, gender_input, prompt_input],
185
  outputs=output_gallery
186
  )
187
 
188
- # Launch the interface
189
  demo.queue()
190
  demo.launch()
 
152
  background: #e64a19;
153
  }
154
  '''
 
155
  with gr.Blocks(css=css) as demo:
156
  gr.Markdown("# Image Generation with Face ID")
157
  gr.Markdown("Upload your face images and enter a prompt to generate images.")
158
 
159
+ images_input = gr.Files(
160
+ label="Drag 1 or more photos of your face",
161
+ file_types=["image"]
162
+ )
163
+ gender_input = gr.Radio(
164
+ label="Select Gender",
165
+ choices=["Female", "Male"],
166
+ value="Female",
167
+ type="value"
168
+ )
169
+ prompt_input = gr.Textbox(
170
+ label="Enter your prompt",
171
+ placeholder="Describe the image you want to generate..."
172
+ )
173
+ run_button = gr.Button("Generate Image")
174
+ output_gallery = gr.Gallery(label="Generated Images")
175
+
 
 
 
 
 
176
  run_button.click(
177
  fn=generate_image,
178
  inputs=[images_input, gender_input, prompt_input],
179
  outputs=output_gallery
180
  )
181
 
 
182
  demo.queue()
183
  demo.launch()