Spaces:
Runtime error
Runtime error
feat: add similarity model package with feature extraction, deduplication, and semantic comparison tools
Browse files
src/similarity_model/feature_similarity.py
CHANGED
|
@@ -8,7 +8,7 @@ from functools import lru_cache
|
|
| 8 |
|
| 9 |
logger = logging.getLogger(__name__)
|
| 10 |
|
| 11 |
-
MODEL_NAME = "all-
|
| 12 |
SIMILARITY_WEIGHT = 0.70
|
| 13 |
COVERAGE_WEIGHT = 0.30
|
| 14 |
DEFAULT_THRESHOLD = 0.65
|
|
|
|
| 8 |
|
| 9 |
logger = logging.getLogger(__name__)
|
| 10 |
|
| 11 |
+
MODEL_NAME = "all-mpnet-base-v2"
|
| 12 |
SIMILARITY_WEIGHT = 0.70
|
| 13 |
COVERAGE_WEIGHT = 0.30
|
| 14 |
DEFAULT_THRESHOLD = 0.65
|
src/similarity_model/preprocessing.py
CHANGED
|
@@ -11,7 +11,7 @@ from sklearn.metrics.pairwise import cosine_similarity
|
|
| 11 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s | %(levelname)s | %(message)s")
|
| 12 |
logger = logging.getLogger(__name__)
|
| 13 |
|
| 14 |
-
MODEL_NAME = "all-
|
| 15 |
|
| 16 |
@lru_cache(maxsize=1)
|
| 17 |
def _get_embed_model():
|
|
|
|
| 11 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s | %(levelname)s | %(message)s")
|
| 12 |
logger = logging.getLogger(__name__)
|
| 13 |
|
| 14 |
+
MODEL_NAME = "all-mpnet-base-v2"
|
| 15 |
|
| 16 |
@lru_cache(maxsize=1)
|
| 17 |
def _get_embed_model():
|
src/similarity_model/semantic_search.py
CHANGED
|
@@ -19,7 +19,7 @@ logging.basicConfig(
|
|
| 19 |
)
|
| 20 |
logger = logging.getLogger(__name__)
|
| 21 |
|
| 22 |
-
DEFAULT_MODEL = "all-
|
| 23 |
|
| 24 |
TITLE_COL = "project_title"
|
| 25 |
TECH_COL = "technologies"
|
|
|
|
| 19 |
)
|
| 20 |
logger = logging.getLogger(__name__)
|
| 21 |
|
| 22 |
+
DEFAULT_MODEL = "all-mpnet-base-v2"
|
| 23 |
|
| 24 |
TITLE_COL = "project_title"
|
| 25 |
TECH_COL = "technologies"
|