Spaces:
Runtime error
Runtime error
add logger
Browse files
app.py
CHANGED
|
@@ -4,6 +4,10 @@ import pickle
|
|
| 4 |
import os
|
| 5 |
import gradio as gr
|
| 6 |
import zipfile
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Load CLIP model
|
| 9 |
text_model = SentenceTransformer('clip-ViT-B-32-multilingual-v1')
|
|
@@ -40,7 +44,8 @@ duplicates = util.paraphrase_mining_embeddings(img_emb)
|
|
| 40 |
|
| 41 |
|
| 42 |
def search_duplicates(threshold=100):
|
| 43 |
-
|
|
|
|
| 44 |
threshold /= 100
|
| 45 |
near_duplicates = [entry for entry in duplicates if entry[0] <= threshold]
|
| 46 |
images = []
|
|
|
|
| 4 |
import os
|
| 5 |
import gradio as gr
|
| 6 |
import zipfile
|
| 7 |
+
import logging
|
| 8 |
+
import datetime
|
| 9 |
+
|
| 10 |
+
logger = logging.getLogger(__name__)
|
| 11 |
|
| 12 |
# Load CLIP model
|
| 13 |
text_model = SentenceTransformer('clip-ViT-B-32-multilingual-v1')
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
def search_duplicates(threshold=100):
|
| 47 |
+
current_time = datetime.datetime.now()
|
| 48 |
+
logger.warning(f"{current_time} : {threshold}")
|
| 49 |
threshold /= 100
|
| 50 |
near_duplicates = [entry for entry in duplicates if entry[0] <= threshold]
|
| 51 |
images = []
|