feat: US-013 - Self-host ONNX embedding model
Download all-MiniLM-L6-v2 model files to public/models/ and configure @xenova/transformers to load from local path instead of Hugging Face CDN. Eliminates external dependency for semantic search embedding model.
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import { pipeline, type FeatureExtractionPipeline } from '@xenova/transformers'
|
||||
import { env, pipeline, type FeatureExtractionPipeline } from '@xenova/transformers'
|
||||
|
||||
// Serve model files from /models/ (Vite serves public/ at root)
|
||||
env.localModelPath = '/models/'
|
||||
env.allowRemoteModels = false
|
||||
env.useBrowserCache = false
|
||||
|
||||
let extractor: FeatureExtractionPipeline | null = null
|
||||
let loading = false
|
||||
|
||||
Reference in New Issue
Block a user