Spaces:
Sleeping
Sleeping
cheng
commited on
Commit
·
baab402
1
Parent(s):
30133dc
update cpu version
Browse files- clip_component.py +2 -2
clip_component.py
CHANGED
@@ -7,9 +7,9 @@ import clip
|
|
7 |
def get_token_from_clip(image):
|
8 |
|
9 |
text_inputs = ["Bacon", "Bread", "Fruit", "Beans and Rice", "fries", "Lasagna"]
|
10 |
-
text_tokens = clip.tokenize(text_inputs)
|
11 |
|
12 |
-
device = "
|
13 |
model, preprocess = clip.load("ViT-B/32")
|
14 |
|
15 |
print("device: ", device)
|
|
|
7 |
def get_token_from_clip(image):
|
8 |
|
9 |
text_inputs = ["Bacon", "Bread", "Fruit", "Beans and Rice", "fries", "Lasagna"]
|
10 |
+
text_tokens = clip.tokenize(text_inputs)
|
11 |
|
12 |
+
device = "cpu"
|
13 |
model, preprocess = clip.load("ViT-B/32")
|
14 |
|
15 |
print("device: ", device)
|