Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -506,7 +506,11 @@ nest_asyncio.apply()
|
|
| 506 |
GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
|
| 507 |
|
| 508 |
groq_client = Groq(api_key=GROQ_API_KEY)
|
| 509 |
-
embedding_function = SentenceTransformerEmbeddingFunction(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 510 |
|
| 511 |
chroma_client = chromadb.Client()
|
| 512 |
collection = chroma_client.get_or_create_collection("icodeguru_knowledge", embedding_function=embedding_function)
|
|
|
|
| 506 |
GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
|
| 507 |
|
| 508 |
groq_client = Groq(api_key=GROQ_API_KEY)
|
| 509 |
+
embedding_function = SentenceTransformerEmbeddingFunction(
|
| 510 |
+
model_name="all-MiniLM-L6-v2",
|
| 511 |
+
device="cpu"
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
|
| 515 |
chroma_client = chromadb.Client()
|
| 516 |
collection = chroma_client.get_or_create_collection("icodeguru_knowledge", embedding_function=embedding_function)
|