jmparejaz commited on
Commit
272cbe8
·
verified ·
1 Parent(s): 2afb0e8

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. Dockerfile +31 -0
  2. README.md +1 -3
  3. requirements.txt +1 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Install system dependencies including Tesseract OCR
4
+ RUN apt-get update && apt-get install -y \
5
+ tesseract-ocr \
6
+ tesseract-ocr-spa \
7
+ libgl1-mesa-glx \
8
+ libglib2.0-0 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Set working directory
12
+ WORKDIR /app
13
+
14
+ # Copy requirements first for better caching
15
+ COPY requirements.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy application code
21
+ COPY app.py .
22
+
23
+ # Expose port for Gradio
24
+ EXPOSE 7860
25
+
26
+ # Set environment variables
27
+ ENV GRADIO_SERVER_NAME=0.0.0.0
28
+ ENV GRADIO_SERVER_PORT=7860
29
+
30
+ # Run the application
31
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -3,9 +3,7 @@ title: LayoutLMv3 Document Classifier
3
  emoji: 📄
4
  colorFrom: blue
5
  colorTo: indigo
6
- sdk: gradio
7
- sdk_version: 5.0.0
8
- app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
  short_description: Clasificador de documentos legales con LayoutLMv3
 
3
  emoji: 📄
4
  colorFrom: blue
5
  colorTo: indigo
6
+ sdk: docker
 
 
7
  pinned: false
8
  license: apache-2.0
9
  short_description: Clasificador de documentos legales con LayoutLMv3
requirements.txt CHANGED
@@ -4,3 +4,4 @@ torch>=2.0.0
4
  Pillow>=10.0.0
5
  pymupdf>=1.24.0
6
  numpy>=1.24.0
 
 
4
  Pillow>=10.0.0
5
  pymupdf>=1.24.0
6
  numpy>=1.24.0
7
+ pytesseract>=0.3.10