Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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()
|