Spaces:
Runtime error
Runtime error
Upload utils.py
Browse files
utils.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
import os
|
| 4 |
from dotenv import load_dotenv
|
| 5 |
from langchain_qdrant import QdrantVectorStore
|
| 6 |
-
from
|
| 7 |
from crewai import Agent, Task, Crew, Process, LLM
|
| 8 |
import requests
|
| 9 |
from requests.exceptions import ConnectionError, Timeout, HTTPError
|
|
@@ -22,7 +22,7 @@ SERPER_API_KEY = os.getenv("SERPER_API_KEY")
|
|
| 22 |
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
|
| 23 |
|
| 24 |
# Initialize embeddings
|
| 25 |
-
embeddings = HuggingFaceEmbeddings(model_name='
|
| 26 |
|
| 27 |
# Connect to the existing Qdrant collection
|
| 28 |
qdrant = QdrantVectorStore.from_existing_collection(
|
|
|
|
| 3 |
import os
|
| 4 |
from dotenv import load_dotenv
|
| 5 |
from langchain_qdrant import QdrantVectorStore
|
| 6 |
+
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 7 |
from crewai import Agent, Task, Crew, Process, LLM
|
| 8 |
import requests
|
| 9 |
from requests.exceptions import ConnectionError, Timeout, HTTPError
|
|
|
|
| 22 |
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
|
| 23 |
|
| 24 |
# Initialize embeddings
|
| 25 |
+
embeddings = HuggingFaceEmbeddings(model_name='all-MiniLM-L6-v2', cache_folder="/tmp")
|
| 26 |
|
| 27 |
# Connect to the existing Qdrant collection
|
| 28 |
qdrant = QdrantVectorStore.from_existing_collection(
|