CiaraRowles commited on
Commit
fbd72cb
·
verified ·
1 Parent(s): 25b7e03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,7 +47,7 @@ ip_model = IPAdapterInstruct(pipe, image_encoder_path, ip_ckpt, device,dtypein=t
47
  cv2.setNumThreads(1)
48
 
49
  @spaces.GPU(enable_queue=True)
50
- def generate_image(images, prompt, negative_prompt, scale, nfaa_negative_prompt, progress=gr.Progress(track_tqdm=True)):
51
  faceid_all_embeds = []
52
  first_iteration = True
53
  image = images[0]
@@ -103,7 +103,7 @@ with gr.Blocks(css=css) as demo:
103
  files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, clear_button, files])
104
  remove_and_reupload.click(fn=remove_back_to_files, outputs=[uploaded_files, clear_button, files])
105
  submit.click(fn=generate_image,
106
- inputs=[files,prompt,negative_prompt, 1.0, nfaa_negative_prompts],
107
  outputs=gallery)
108
 
109
  gr.Markdown("This demo includes extra features to mitigate the implicit bias of the model and prevent explicit usage of it to generate content with faces of people, including third parties, that is not safe for all audiences, including naked or semi-naked people.")
 
47
  cv2.setNumThreads(1)
48
 
49
  @spaces.GPU(enable_queue=True)
50
+ def generate_image(images, prompt, negative_prompt, nfaa_negative_prompt, progress=gr.Progress(track_tqdm=True)):
51
  faceid_all_embeds = []
52
  first_iteration = True
53
  image = images[0]
 
103
  files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, clear_button, files])
104
  remove_and_reupload.click(fn=remove_back_to_files, outputs=[uploaded_files, clear_button, files])
105
  submit.click(fn=generate_image,
106
+ inputs=[files,prompt,negative_prompt, nfaa_negative_prompts],
107
  outputs=gallery)
108
 
109
  gr.Markdown("This demo includes extra features to mitigate the implicit bias of the model and prevent explicit usage of it to generate content with faces of people, including third parties, that is not safe for all audiences, including naked or semi-naked people.")