sraimund commited on
Commit
3c0ef47
·
verified ·
1 Parent(s): ac6ac91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -13,12 +13,10 @@ def predict(image):
13
  image_features = model.encode_image(image)
14
  image_features /= image_features.norm(dim=-1, keepdim=True)
15
 
16
- embedding = image_features[0]
17
- print(embedding)
18
 
19
  model = joblib.load('model.pkl')
20
  result = model.predict([embedding])
21
- print(result)
22
 
23
  return "Map" if result == 1 else "No map"
24
 
 
13
  image_features = model.encode_image(image)
14
  image_features /= image_features.norm(dim=-1, keepdim=True)
15
 
16
+ embedding = image_features[0].cpu().float().numpy()
 
17
 
18
  model = joblib.load('model.pkl')
19
  result = model.predict([embedding])
 
20
 
21
  return "Map" if result == 1 else "No map"
22