ford442 commited on
Commit
8b61ecb
1 Parent(s): eaf81c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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):