Spaces:
Paused
Paused
fix some run bugs
Browse filesFormer-commit-id: 30de1ada8db7e6033ffa145812cc25d59743c0b8
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(
|
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 = [
|
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())
|