Nursing Citizen Development commited on
Commit
5ee6662
·
1 Parent(s): 92485ac

Fix: Force embedding models to CPU for ZeroGPU compatibility

Browse files
Files changed (1) hide show
  1. knowledge_base.py +2 -1
knowledge_base.py CHANGED
@@ -7,7 +7,8 @@ import marko
7
  class PNAKnowledgeBase:
8
  def __init__(self, guide_path):
9
  self.guide_path = guide_path
10
- self.encoder = SentenceTransformer('all-MiniLM-L6-v2')
 
11
  self.chunks = []
12
  self.index = None
13
 
 
7
  class PNAKnowledgeBase:
8
  def __init__(self, guide_path):
9
  self.guide_path = guide_path
10
+ # Force CPU for embeddings to avoid ZeroGPU device mismatch
11
+ self.encoder = SentenceTransformer('all-MiniLM-L6-v2', device='cpu')
12
  self.chunks = []
13
  self.index = None
14