Spaces:
Sleeping
Sleeping
Commit ·
30133dc
1
Parent(s): 2a11855
update clip dependency
Browse files- clip_component.py +1 -1
- detector.py +2 -0
clip_component.py
CHANGED
|
@@ -2,7 +2,7 @@ import cv2
|
|
| 2 |
import torch
|
| 3 |
import os
|
| 4 |
from PIL import Image
|
| 5 |
-
import
|
| 6 |
|
| 7 |
def get_token_from_clip(image):
|
| 8 |
|
|
|
|
| 2 |
import torch
|
| 3 |
import os
|
| 4 |
from PIL import Image
|
| 5 |
+
import clip
|
| 6 |
|
| 7 |
def get_token_from_clip(image):
|
| 8 |
|
detector.py
CHANGED
|
@@ -3,5 +3,7 @@ from grounding_component import run_grounding
|
|
| 3 |
|
| 4 |
def detect(image):
|
| 5 |
token = get_token_from_clip(image)
|
|
|
|
|
|
|
| 6 |
predict_image = run_grounding(image,token)
|
| 7 |
return predict_image
|
|
|
|
| 3 |
|
| 4 |
def detect(image):
|
| 5 |
token = get_token_from_clip(image)
|
| 6 |
+
print('token')
|
| 7 |
+
print(token)
|
| 8 |
predict_image = run_grounding(image,token)
|
| 9 |
return predict_image
|