ilsa15 commited on
Commit
bb7c680
·
verified ·
1 Parent(s): 4d9037a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -337,8 +337,9 @@ channel_id = "UCsv3kmQ5k1eIRG2R9mWN" # iCodeGuru
337
  BASE_URL = "https://icode.guru"
338
 
339
  groq_client = Groq(api_key=GROQ_API_KEY)
340
- embed_model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
341
- embedding_function = SentenceTransformerEmbeddingFunction(embed_model)
 
342
 
343
  chroma_client = chromadb.Client()
344
  collection = chroma_client.get_or_create_collection("icodeguru_knowledge", embedding_function=embedding_function)
 
337
  BASE_URL = "https://icode.guru"
338
 
339
  groq_client = Groq(api_key=GROQ_API_KEY)
340
+ from chromadb.utils.embedding_functions import SentenceTransformerEmbeddingFunction
341
+
342
+ embedding_function = SentenceTransformerEmbeddingFunction("all-MiniLM-L6-v2")
343
 
344
  chroma_client = chromadb.Client()
345
  collection = chroma_client.get_or_create_collection("icodeguru_knowledge", embedding_function=embedding_function)