Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import torchvision.transforms as T
|
@@ -41,7 +42,10 @@ def predict(image):
|
|
41 |
embedding = dinov2(transformed_img)
|
42 |
print(embedding.shape)
|
43 |
embedding = embedding[0].cpu().numpy().tolist()
|
44 |
-
|
|
|
|
|
|
|
45 |
return {
|
46 |
"embedding": embedding
|
47 |
}
|
|
|
1 |
+
from datetime import datetime
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
import torchvision.transforms as T
|
|
|
42 |
embedding = dinov2(transformed_img)
|
43 |
print(embedding.shape)
|
44 |
embedding = embedding[0].cpu().numpy().tolist()
|
45 |
+
# Get the current datetime for logging
|
46 |
+
current_datetime = datetime.now()
|
47 |
+
formatted_datetime = current_datetime.strftime("%Y-%m-%d %H:%M:%S")
|
48 |
+
print(formatted_datetime)
|
49 |
return {
|
50 |
"embedding": embedding
|
51 |
}
|