mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-23 19:11:14 +01:00
12 lines
341 B
Python
12 lines
341 B
Python
|
"""Embedding function for ONNX MiniLM-L6 model used in Chroma."""
|
||
|
|
||
|
from chromadb.utils.embedding_functions import ONNXMiniLM_L6_V2
|
||
|
|
||
|
from frigate.const import MODEL_CACHE_DIR
|
||
|
|
||
|
|
||
|
class MiniLMEmbedding(ONNXMiniLM_L6_V2):
|
||
|
"""Override DOWNLOAD_PATH to download to cache directory."""
|
||
|
|
||
|
DOWNLOAD_PATH = f"{MODEL_CACHE_DIR}/all-MiniLM-L6-v2"
|