Navaneethakrishnan commited on
Commit
2bd2482
·
1 Parent(s): 09281fe

Add Dockerfile for Hugging Face Space

Browse files
Files changed (2) hide show
  1. Dockerfile +21 -0
  2. requirements.txt +29 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies (if needed)
8
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Copy your project files
11
+ COPY . /app
12
+
13
+ # Install Python dependencies
14
+ RUN pip install --upgrade pip
15
+ RUN pip install -r requirements.txt
16
+
17
+ # Expose the port your FastAPI app runs on
18
+ EXPOSE 7860
19
+
20
+ # Run the FastAPI app
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Core document processing libraries
2
+ PyMuPDF==1.23.8
3
+ python-docx==0.8.11
4
+ beautifulsoup4==4.12.2
5
+ pandas==2.1.4
6
+ requests==2.31.0
7
+
8
+ # OCR and image processing
9
+ pytesseract==0.3.10
10
+ Pillow==10.1.0
11
+ opencv-python==4.8.1.78
12
+ pdf2image==1.16.3
13
+
14
+ # Table extraction libraries
15
+ tabula-py==2.8.2
16
+ camelot-py[cv]==0.11.0
17
+
18
+ # LangChain for text splitting (using compatible versions)
19
+ langchain>=0.1.0,<0.2.0
20
+ langchain-text-splitters>=0.0.1
21
+ langchain-community>=0.0.20
22
+
23
+ # Testing dependencies
24
+ pytest==7.4.3
25
+ pytest-cov==4.1.0
26
+
27
+ # Additional utilities
28
+ numpy==1.24.3
29
+ lxml==4.9.3