Spaces:
Runtime error
Runtime error
Commit
·
f201a9c
1
Parent(s):
354600e
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch16")
|
|
9 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch16")
|
10 |
|
11 |
def image_similarity(image: Image.Image, action_prompt: str):
|
12 |
-
positive_text = f"a
|
13 |
-
negative_text = f"
|
14 |
|
15 |
inputs = processor(
|
16 |
text=[positive_text, negative_text],
|
|
|
9 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch16")
|
10 |
|
11 |
def image_similarity(image: Image.Image, action_prompt: str):
|
12 |
+
positive_text = f"a person {action_prompt}"
|
13 |
+
negative_text = f"a person not {action_prompt}"
|
14 |
|
15 |
inputs = processor(
|
16 |
text=[positive_text, negative_text],
|