ktllc commited on
Commit
ad74375
·
1 Parent(s): d3ddcbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,8 +14,9 @@ model_type = "vit_h"
14
  sam = sam_model_registry[model_type](checkpoint=sam_checkpoint)
15
 
16
  # Load the CLIP model
 
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
18
- model, preprocess = clip.load("ViT-B/32", device=device)
19
 
20
  def find_similarity(base64_image, text_input):
21
  try:
 
14
  sam = sam_model_registry[model_type](checkpoint=sam_checkpoint)
15
 
16
  # Load the CLIP model
17
+ model, preprocess = clip.load("ViT-B/32")
18
  device = "cuda" if torch.cuda.is_available() else "cpu"
19
+ model.to(device).eval()
20
 
21
  def find_similarity(base64_image, text_input):
22
  try: