diff options
author | Joanne <zehan_ding@brown.edu> | 2025-06-27 11:03:40 -0400 |
---|---|---|
committer | Joanne <zehan_ding@brown.edu> | 2025-06-27 11:03:40 -0400 |
commit | 496381c2f07031043c2330844bbcd09a0fc10b9d (patch) | |
tree | a680624ecb1f7a0d450bf14f63ebc10ba0faca01 | |
parent | 729f9ed22961af566e903fe651d0cde6401c9fc0 (diff) |
updated pdf upload and linking fixes for chatbot
-rw-r--r-- | src/server/ApiManagers/AssistantManager.ts | 2 | ||||
-rw-r--r-- | src/server/chunker/requirements.txt | 37 |
2 files changed, 30 insertions, 9 deletions
diff --git a/src/server/ApiManagers/AssistantManager.ts b/src/server/ApiManagers/AssistantManager.ts index c7c347c71..07c970a4e 100644 --- a/src/server/ApiManagers/AssistantManager.ts +++ b/src/server/ApiManagers/AssistantManager.ts @@ -1135,7 +1135,7 @@ function spawnPythonProcess(jobId: string, file_path: string, doc_id: string) { console.log('Virtual environment not found. Creating and setting up...'); // Create venv - const createVenvProcess = spawn('python', ['-m', 'venv', venvPath]); + const createVenvProcess = spawn('python3.10', ['-m', 'venv', venvPath]); createVenvProcess.on('close', code => { if (code !== 0) { diff --git a/src/server/chunker/requirements.txt b/src/server/chunker/requirements.txt index 20bd486e5..3df3cdd24 100644 --- a/src/server/chunker/requirements.txt +++ b/src/server/chunker/requirements.txt @@ -1,15 +1,36 @@ +# Prefer official CPU wheels from the PyTorch index +--extra-index-url https://download.pytorch.org/whl/cpu + +############################################################################### +# Stable env for pdf_chunker.py # +############################################################################### + +# ─── LLM clients ───────────────────────────────────────────────────────────── +openai==1.40.6 +httpx==0.27.2 # <0.28 → avoids "proxies=" crash anthropic==0.34.0 cohere==5.8.0 -python-dotenv==1.0.1 + +# ─── Torch stack (CPU) ─────────────────────────────────────────────────────── +torch==2.5.1 +torchvision==0.20.1 # matches torch 2.5.x +torchaudio==2.5.1 + +# ─── Vision / OCR / PDF processing ─────────────────────────────────────────── +ultralyticsplus==0.0.28 +easyocr==1.7.0 pymupdf==1.22.2 -lxml==5.3.0 +PyPDF2==3.0.1 +pytesseract==0.3.10 +Pillow==10.4.0 layoutparser==0.3.4 +lxml==5.3.0 + +# ─── ML / maths ────────────────────────────────────────────────────────────── numpy==1.26.4 -openai==1.40.6 -Pillow==10.4.0 -pytesseract==0.3.10 -PyPDF2==3.0.1 scikit-learn==1.5.1 + +# ─── Utilities ────────────────────────────────────────────────────────────── tqdm==4.66.5 -ultralyticsplus==0.0.28 -easyocr==1.7.0
\ No newline at end of file +python-dotenv==1.0.1 +packaging==24.0
\ No newline at end of file |