Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,9 +46,9 @@ def extract_embedding(image):
|
|
| 46 |
|
| 47 |
# Get the embedding of the image.
|
| 48 |
with torch.no_grad():
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
return {
|
| 53 |
"embedding": embedding
|
| 54 |
}
|
|
|
|
| 46 |
|
| 47 |
# Get the embedding of the image.
|
| 48 |
with torch.no_grad():
|
| 49 |
+
embedding = dinov2(transformed_img)
|
| 50 |
+
# print(embedding.shape)
|
| 51 |
+
embedding = embedding[0].cpu().numpy().tolist()
|
| 52 |
return {
|
| 53 |
"embedding": embedding
|
| 54 |
}
|