weijiawu commited on
Commit
8ac8977
1 Parent(s): 0bfd6ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -80,7 +80,7 @@ def get_prompt(chat_input, click_state):
80
  }
81
  return prompt
82
 
83
- def chat_with_points(chat_input, click_state, state, mask_save_path,image_input):
84
 
85
  points, labels, captions = click_state
86
 
@@ -93,7 +93,7 @@ def chat_with_points(chat_input, click_state, state, mask_save_path,image_input)
93
 
94
 
95
  pipe = pipe
96
- mask = cv2.imread(mask_save_path)
97
 
98
  image_input = np.array(image_input)
99
  h,w = image_input.shape[:2]
@@ -142,7 +142,7 @@ def inference_seg_cap(image_input, point_prompt, language, sentiment, factuality
142
  text = "edit"
143
  image_input = create_bubble_frame(image_input, text, (evt.index[0], evt.index[1]))
144
 
145
- yield state, state, click_state, image_input, out["mask_save_path"]
146
  # if not args.disable_gpt and model.text_refiner:
147
  # refined_caption = model.text_refiner.inference(query=text, controls=controls, context=out['context_captions'])
148
  # # new_cap = 'Original: ' + text + '. Refined: ' + refined_caption['caption']
 
80
  }
81
  return prompt
82
 
83
+ def chat_with_points(chat_input, click_state, state, mask,image_input):
84
 
85
  points, labels, captions = click_state
86
 
 
93
 
94
 
95
  pipe = pipe
96
+ # mask = cv2.imread(mask_save_path)
97
 
98
  image_input = np.array(image_input)
99
  h,w = image_input.shape[:2]
 
142
  text = "edit"
143
  image_input = create_bubble_frame(image_input, text, (evt.index[0], evt.index[1]))
144
 
145
+ yield state, state, click_state, image_input, input_mask
146
  # if not args.disable_gpt and model.text_refiner:
147
  # refined_caption = model.text_refiner.inference(query=text, controls=controls, context=out['context_captions'])
148
  # # new_cap = 'Original: ' + text + '. Refined: ' + refined_caption['caption']