Update app.py
Browse files
app.py
CHANGED
@@ -66,8 +66,8 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
66 |
|
67 |
request_log = []
|
68 |
|
69 |
-
clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32", cache_dir=model_path).to(
|
70 |
-
clip_processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32", cache_dir=model_path).to(
|
71 |
|
72 |
|
73 |
def compute_clip_embedding(text=None, image=None):
|
|
|
66 |
|
67 |
request_log = []
|
68 |
|
69 |
+
clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32", cache_dir=model_path).to(device)
|
70 |
+
clip_processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32", cache_dir=model_path).to(device)
|
71 |
|
72 |
|
73 |
def compute_clip_embedding(text=None, image=None):
|