CiaraRowles commited on
Commit
00d5ce9
·
verified ·
1 Parent(s): 6d78320

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -47,10 +47,10 @@ 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(image, prompt, negative_prompt, preserve_face_structure, face_strength, scale, nfaa_negative_prompt, progress=gr.Progress(track_tqdm=True)):
51
  faceid_all_embeds = []
52
  first_iteration = True
53
-
54
 
55
  #average_embedding = torch.mean(torch.stack(faceid_all_embeds, dim=0), dim=0)
56
 
@@ -84,9 +84,9 @@ with gr.Blocks(css=css) as demo:
84
  gr.Markdown("Demo for the [CiaraRowles/IP-Adapter-Instruct model](https://huggingface.co/CiaraRowles/IP-Adapter-Instruct)")
85
  with gr.Row():
86
  with gr.Column():
87
- files = gr.File(
88
  label="Drag 1 input image",
89
- file_types="image"
90
  )
91
  uploaded_files = gr.Gallery(label="Your image", visible=False, columns=5, rows=1, height=125)
92
  with gr.Column(visible=False) as clear_button:
 
47
  cv2.setNumThreads(1)
48
 
49
  @spaces.GPU(enable_queue=True)
50
+ def generate_image(images, prompt, negative_prompt, preserve_face_structure, face_strength, scale, nfaa_negative_prompt, progress=gr.Progress(track_tqdm=True)):
51
  faceid_all_embeds = []
52
  first_iteration = True
53
+ image = images[0]
54
 
55
  #average_embedding = torch.mean(torch.stack(faceid_all_embeds, dim=0), dim=0)
56
 
 
84
  gr.Markdown("Demo for the [CiaraRowles/IP-Adapter-Instruct model](https://huggingface.co/CiaraRowles/IP-Adapter-Instruct)")
85
  with gr.Row():
86
  with gr.Column():
87
+ files = gr.Files(
88
  label="Drag 1 input image",
89
+ file_types=["image"]
90
  )
91
  uploaded_files = gr.Gallery(label="Your image", visible=False, columns=5, rows=1, height=125)
92
  with gr.Column(visible=False) as clear_button: