Spaces:
Sleeping
Sleeping
Initial Commit 5.1.0
Browse files- .huggingface.yaml +1 -0
- Dockerfile +7 -7
- requirements.txt +0 -1
.huggingface.yaml
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
sdk: docker
|
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
git \
|
| 8 |
tesseract-ocr \
|
|
@@ -11,15 +11,15 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
texlive \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
RUN git clone https://github.com/lukas-blecher/LaTeX-OCR.git /opt/latexocr \
|
| 16 |
-
|
| 17 |
|
| 18 |
-
# Copy
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
-
# Install
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
-
#
|
| 25 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install OS dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
git \
|
| 8 |
tesseract-ocr \
|
|
|
|
| 11 |
texlive \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Install LaTeX-OCR manually
|
| 15 |
+
RUN git clone https://github.com/lukas-blecher/LaTeX-OCR.git /opt/latexocr && \
|
| 16 |
+
pip install /opt/latexocr
|
| 17 |
|
| 18 |
+
# Copy code
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# Install app dependencies
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
+
# Run FastAPI app
|
| 25 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
|
@@ -7,6 +7,5 @@ pdf2image
|
|
| 7 |
Pillow
|
| 8 |
beautifulsoup4
|
| 9 |
python-docx
|
| 10 |
-
LaTeX-OCR
|
| 11 |
torch
|
| 12 |
transformers
|
|
|
|
| 7 |
Pillow
|
| 8 |
beautifulsoup4
|
| 9 |
python-docx
|
|
|
|
| 10 |
torch
|
| 11 |
transformers
|