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