Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/mbuck17/paddleocr-processor
Browse files- README.md +2 -4
- packages.txt +10 -0
- requirements.txt +5 -4
- startup.sh +13 -0
README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
"""
|
| 2 |
---
|
| 3 |
title: PaddleOCR Medical Document Processor
|
| 4 |
emoji: 🏥
|
|
@@ -22,8 +21,7 @@ This Hugging Face Space provides OCR processing for medical documents using Padd
|
|
| 22 |
- Multi-page PDF support
|
| 23 |
|
| 24 |
## API Usage
|
| 25 |
-
Send POST requests to the `/api/predict` endpoint with JSON data
|
| 26 |
|
| 27 |
## Integration
|
| 28 |
-
This space can be integrated with external applications as an OCR microservice.
|
| 29 |
-
"""
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: PaddleOCR Medical Document Processor
|
| 3 |
emoji: 🏥
|
|
|
|
| 21 |
- Multi-page PDF support
|
| 22 |
|
| 23 |
## API Usage
|
| 24 |
+
Send POST requests to the `/api/predict` endpoint with JSON data.
|
| 25 |
|
| 26 |
## Integration
|
| 27 |
+
This space can be integrated with external applications as an OCR microservice.
|
|
|
packages.txt
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
libssl3
|
| 2 |
+
libssl-dev
|
| 3 |
+
libglib2.0-0
|
| 4 |
+
libsm6
|
| 5 |
+
libxext6
|
| 6 |
+
libxrender-dev
|
| 7 |
+
libgomp1
|
| 8 |
+
libgl1-mesa-glx
|
| 9 |
+
wget
|
| 10 |
+
dpkg-dev
|
requirements.txt
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
-
gradio==4.
|
| 2 |
-
paddlepaddle==2.
|
| 3 |
paddleocr==2.6.1.3
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
| 1 |
+
gradio==4.44.0
|
| 2 |
+
paddlepaddle==2.4.2
|
| 3 |
paddleocr==2.6.1.3
|
| 4 |
+
Pillow>=9.0.0
|
| 5 |
+
opencv-python-headless<=4.6.0.66
|
| 6 |
+
PyMuPDF<1.21.0
|
startup.sh
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Download and install libssl1.1 from Ubuntu 20.04 repos
|
| 4 |
+
echo "Installing libssl1.1 compatibility..."
|
| 5 |
+
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
|
| 6 |
+
dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb || apt-get install -f -y
|
| 7 |
+
|
| 8 |
+
# Create symlinks if needed
|
| 9 |
+
ln -sf /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 2>/dev/null || true
|
| 10 |
+
ln -sf /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 2>/dev/null || true
|
| 11 |
+
|
| 12 |
+
# Run the app
|
| 13 |
+
python app.py
|