Spaces:
Sleeping
Sleeping
Update functions.py
Browse files- functions.py +3 -3
functions.py
CHANGED
@@ -15,7 +15,7 @@ from pandasai import SmartDataframe
|
|
15 |
from langchain_core.chat_history import BaseChatMessageHistory
|
16 |
from langchain_community.document_loaders import YoutubeLoader
|
17 |
from langchain.docstore.document import Document
|
18 |
-
from
|
19 |
from langchain_qdrant import FastEmbedSparse
|
20 |
from supabase.client import create_client
|
21 |
from qdrant_client import QdrantClient
|
@@ -38,8 +38,8 @@ client = create_client(os.environ["SUPABASE_URL"], os.environ["SUPABASE_KEY"])
|
|
38 |
qdrantClient = QdrantClient(url=os.environ["QDRANT_URL"], api_key=os.environ["QDRANT_API_KEY"])
|
39 |
model_kwargs = {"device": "cuda"}
|
40 |
encode_kwargs = {"normalize_embeddings": True}
|
41 |
-
vectorEmbeddings =
|
42 |
-
model_name="
|
43 |
model_kwargs=model_kwargs,
|
44 |
encode_kwargs=encode_kwargs
|
45 |
)
|
|
|
15 |
from langchain_core.chat_history import BaseChatMessageHistory
|
16 |
from langchain_community.document_loaders import YoutubeLoader
|
17 |
from langchain.docstore.document import Document
|
18 |
+
from langchain_huggingface import HuggingFaceEmbeddings
|
19 |
from langchain_qdrant import FastEmbedSparse
|
20 |
from supabase.client import create_client
|
21 |
from qdrant_client import QdrantClient
|
|
|
38 |
qdrantClient = QdrantClient(url=os.environ["QDRANT_URL"], api_key=os.environ["QDRANT_API_KEY"])
|
39 |
model_kwargs = {"device": "cuda"}
|
40 |
encode_kwargs = {"normalize_embeddings": True}
|
41 |
+
vectorEmbeddings = HuggingFaceEmbeddings(
|
42 |
+
model_name="dunzhang/stella_en_1.5B_v5",
|
43 |
model_kwargs=model_kwargs,
|
44 |
encode_kwargs=encode_kwargs
|
45 |
)
|