xbkaishui commited on
Commit
4ffbe39
·
1 Parent(s): fc34e7d
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -236,7 +236,7 @@ def inference(input_str, input_image):
236
  conv.append_message(conv.roles[1], "")
237
  prompt = conv.get_prompt()
238
 
239
- image_np = cv2.imread(image_path)
240
  image_np = cv2.cvtColor(image_np, cv2.COLOR_BGR2RGB)
241
  original_size_list = [image_np.shape[:2]]
242
 
@@ -255,7 +255,7 @@ def inference(input_str, input_image):
255
  image_clip = image_clip.float()
256
 
257
  image = transform.apply_image(image_np)
258
- resize_list = [images.shape[:2]]
259
 
260
  image = (
261
  preprocess(torch.from_numpy(image).permute(2, 0, 1).contiguous())
 
236
  conv.append_message(conv.roles[1], "")
237
  prompt = conv.get_prompt()
238
 
239
+ image_np = cv2.imread(input_image)
240
  image_np = cv2.cvtColor(image_np, cv2.COLOR_BGR2RGB)
241
  original_size_list = [image_np.shape[:2]]
242
 
 
255
  image_clip = image_clip.float()
256
 
257
  image = transform.apply_image(image_np)
258
+ resize_list = [image.shape[:2]]
259
 
260
  image = (
261
  preprocess(torch.from_numpy(image).permute(2, 0, 1).contiguous())