Spaces:
Sleeping
Sleeping
Download app/modules/groups/infrastructure/semantic_document.py from AlleksDev/frimeet-api-nlp: direct link, hf CLI and curl.
- Browser
- Download file 449 Bytes
-
https://huggingface.co/spaces/AlleksDev/frimeet-api-nlp/resolve/main/app/modules/groups/infrastructure/semantic_document.py
- Command line
-
hf download hf://spaces/AlleksDev/frimeet-api-nlp/app/modules/groups/infrastructure/semantic_document.py
-
curl -L -o semantic_document.py https://huggingface.co/spaces/AlleksDev/frimeet-api-nlp/resolve/main/app/modules/groups/infrastructure/semantic_document.py
449 Bytes
| from app.shared.nlp.embeddings.weighted_document import build_weighted_document | |
| GROUP_SEARCH_DOCUMENT_VERSION = "group-search-v1" | |
| GROUP_SEARCH_FIELD_WEIGHTS = {"name": 8, "description": 3} | |
| def build_group_search_document(name: str, description: str) -> str: | |
| return build_weighted_document( | |
| [ | |
| (name, GROUP_SEARCH_FIELD_WEIGHTS["name"]), | |
| (description, GROUP_SEARCH_FIELD_WEIGHTS["description"]), | |
| ] | |
| ) | |