srijaydeshpande commited on
Commit
5ffb4e8
·
verified ·
1 Parent(s): 89dc473

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -7,6 +7,9 @@ from pulid import attention_processor as attention
7
  from pulid.pipeline import PuLIDPipeline
8
  from pulid.utils import resize_numpy_image_long, seed_everything
9
 
 
 
 
10
  torch.set_grad_enabled(False)
11
 
12
  pipeline = PuLIDPipeline()
@@ -182,7 +185,14 @@ with gr.Blocks(title="AI headshot Generator", css=".gr-box {border-color: #8136e
182
 
183
  output = gr.Gallery(label='Output', elem_id="gallery")
184
  intermediate_output = gr.Gallery(label='DebugImage', elem_id="gallery", visible=False)
185
- submit = gr.Button("Generate")
186
- submit.click(fn=run, inputs=['textbox', 'textbox', 'textbox'], outputs=[output, intermediate_output])
 
 
 
 
 
 
 
187
 
188
  demo.launch()
 
7
  from pulid.pipeline import PuLIDPipeline
8
  from pulid.utils import resize_numpy_image_long, seed_everything
9
 
10
+ import boto3
11
+ from botocore.exceptions import ClientError
12
+
13
  torch.set_grad_enabled(False)
14
 
15
  pipeline = PuLIDPipeline()
 
185
 
186
  output = gr.Gallery(label='Output', elem_id="gallery")
187
  intermediate_output = gr.Gallery(label='DebugImage', elem_id="gallery", visible=False)
188
+ # submit = gr.Button("Generate")
189
+ # submit.click(fn=run, inputs=['textbox', 'textbox', 'textbox'], outputs=[output, intermediate_output])
190
+
191
+ demo = gr.Interface(
192
+ run,
193
+ inputs=['textbox', 'textbox', 'textbox'],
194
+ outputs=[output, intermediate_output],
195
+ title="AI Headshot Diffusor"
196
+ )
197
 
198
  demo.launch()