saadawaissheikh commited on
Commit
7ce1fea
·
verified ·
1 Parent(s): 866e2dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -23,6 +23,11 @@ os.environ["OPENAI_API_HEADERS"] = '{"HTTP-Referer":"https://huggingface.co/spac
23
  # ✅ Load PDF once at startup
24
  PDF_PATH = "healthcare_policy.pdf"
25
 
 
 
 
 
 
26
  class TfidfEmbedding(Embeddings):
27
  def __init__(self):
28
  self.vectorizer = TfidfVectorizer()
 
23
  # ✅ Load PDF once at startup
24
  PDF_PATH = "healthcare_policy.pdf"
25
 
26
+ import pytesseract
27
+
28
+ # Optional: Force the path to tesseract if needed
29
+ pytesseract.pytesseract.tesseract_cmd = "/usr/bin/tesseract"
30
+
31
  class TfidfEmbedding(Embeddings):
32
  def __init__(self):
33
  self.vectorizer = TfidfVectorizer()