Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -29,12 +29,13 @@ logger = get_logger(__name__)
|
|
| 29 |
|
| 30 |
# βββββββ embeddings βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 31 |
# Switch to local BGE embeddings (no JSONDecode errors, no HTTPβbatch issues) :contentReference[oaicite:0]{index=0}
|
| 32 |
-
embeddings
|
|
|
|
|
|
|
| 33 |
model_name="BAAI/bge-large-en-v1.5",
|
| 34 |
model_kwargs={"device": "cpu"},
|
| 35 |
-
encode_kwargs={"normalize_embeddings": True}
|
| 36 |
)
|
| 37 |
-
|
| 38 |
# βββββββ vector store + memory βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 39 |
vector_store = SupabaseVectorStore(
|
| 40 |
client=supabase,
|
|
|
|
| 29 |
|
| 30 |
# βββββββ embeddings βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 31 |
# Switch to local BGE embeddings (no JSONDecode errors, no HTTPβbatch issues) :contentReference[oaicite:0]{index=0}
|
| 32 |
+
from langchain_community.embeddings import SentenceTransformerEmbeddings
|
| 33 |
+
|
| 34 |
+
embeddings = SentenceTransformerEmbeddings(
|
| 35 |
model_name="BAAI/bge-large-en-v1.5",
|
| 36 |
model_kwargs={"device": "cpu"},
|
| 37 |
+
encode_kwargs={"normalize_embeddings": True}
|
| 38 |
)
|
|
|
|
| 39 |
# βββββββ vector store + memory βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 40 |
vector_store = SupabaseVectorStore(
|
| 41 |
client=supabase,
|