ilsa15 commited on
Commit
5090c0a
·
verified ·
1 Parent(s): ea9598a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -671,11 +671,17 @@ GROQ_MODEL = "llama3-8b-8192"
671
  # Initialize Groq client
672
  groq_client = Groq(api_key=GROQ_API_KEY)
673
 
674
- # Explicitly load SentenceTransformer model first to avoid meta tensor bug
675
- embedding_model = SentenceTransformer("all-MiniLM-L6-v2")
 
 
 
 
 
 
 
 
676
 
677
- # Pass this model into Chroma's embedding function
678
- embedding_function = SentenceTransformerEmbeddingFunction(embedding_model=embedding_model)
679
 
680
 
681
  # Initialize ChromaDB Persistent Client
 
671
  # Initialize Groq client
672
  groq_client = Groq(api_key=GROQ_API_KEY)
673
 
674
+ # # Explicitly load SentenceTransformer model first to avoid meta tensor bug
675
+ # embedding_model = SentenceTransformer "(all-MiniLM-L6-v2)"
676
+
677
+ # # Pass this model into Chroma's embedding function
678
+ # embedding_function = SentenceTransformerEmbeddingFunction(embedding_model=embedding_model)
679
+
680
+ embedding_function = SentenceTransformerEmbeddingFunction(
681
+ model_name="all-MiniLM-L6-v2",
682
+ device="cpu"
683
+ )
684
 
 
 
685
 
686
 
687
  # Initialize ChromaDB Persistent Client