Metadata-Version: 2.3
Name: pocro
Version: 0.1.3
Summary: OCR+LLM stack with GPU optimization, multilingual support, and EU compliance
Author: FinOfficer Team
Author-email: contact@finofficer.com
Requires-Python: >=3.9,<3.14
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: accelerate (==0.24.1)
Requires-Dist: alembic (==1.12.1)
Requires-Dist: bitsandbytes (==0.41.2.post2)
Requires-Dist: click (==8.1.7)
Requires-Dist: easyocr (==1.7.0)
Requires-Dist: fastapi (==0.104.1)
Requires-Dist: loguru (==0.7.2)
Requires-Dist: numpy (==1.24.3)
Requires-Dist: opencv-python (==4.8.1.78)
Requires-Dist: paddleocr (==2.7.0)
Requires-Dist: pandas (==2.1.3)
Requires-Dist: pdf2image (==1.16.3)
Requires-Dist: pillow (==11.2.1)
Requires-Dist: prometheus-client (==0.19.0)
Requires-Dist: psutil (==5.9.6)
Requires-Dist: pydantic (==2.5.0)
Requires-Dist: pymupdf (==1.26.1)
Requires-Dist: python-dotenv (==1.0.0)
Requires-Dist: python-multipart (==0.0.6)
Requires-Dist: redis (==5.0.1)
Requires-Dist: sqlalchemy (==2.0.23)
Requires-Dist: torch (==2.1.0)
Requires-Dist: torchvision (==0.16.0)
Requires-Dist: tqdm (==4.66.1)
Requires-Dist: transformers (==4.35.0)
Requires-Dist: uvicorn[standard] (==0.24.0)
Requires-Dist: vllm (==0.2.2)
Description-Content-Type: text/markdown

# procr


## Kluczowe funkcjonalności:

✅ **Pełny stack OCR+LLM** - EasyOCR/PaddleOCR + Mistral/Qwen/LLaMA  
✅ **GPU optimized** - AWQ/NF4 quantization dla 8GB VRAM  
✅ **Multilingual** - DE/EN/EE z automatyczną detekcją języka  
✅ **EU compliance** - Schema EN 16931 i PEPPOL  
✅ **Production ready** - Docker, monitoring, health checks  
✅ **Comprehensive tests** - Unit, integration, performance  
✅ **Easy deployment** - Makefile, scripts, dokumentacja  


## Szybki start:

```bash
# 1. Klonowanie i setup
git clone git@github.com:fin-officer/procr.git
cd procr
cp .env.example .env

# 2. Instalacja zależności produkcyjnych
make install

# 3. (Opcjonalnie) Instalacja zależności developerskich
make install-dev

# 4. Setup środowiska (modele, uprawnienia, pre-commit)
make setup

# 5. Pobranie modeli OCR/LLM
make download-models

# 6. Uruchomienie lokalnie
make run

# 7. Lub z Docker
make docker-build
make docker-run

# 8. Testy
make test
make test-cov

# 9. Lintowanie i formatowanie
make lint
make format

# 10. Walidacja instalacji
make validate

# 11. Benchmark
make benchmark
```

## Struktura projektu

```
procr/
├── README.md
├── requirements.txt
├── requirements-dev.txt
├── pyproject.toml
├── .env.example
├── .gitignore
├── .dockerignore
├── Dockerfile
├── docker-compose.yml
├── docker-compose.dev.yml
├── Makefile
├── setup.py
│
├── src/
│   ├── __init__.py
│   ├── main.py
│   ├── api/
│   ├── config/
│   ├── core/
│   ├── models/
│   ├── prompts/
│   └── utils/
│
├── scripts/
│   ├── benchmark.py
│   ├── download_models.py
│   ├── migrate_data.py
│   ├── setup_environment.sh
│   └── validate_installation.py
│
├── tests/
│   ├── __init__.py
│   ├── conftest.py
│   ├── fixtures/
│   ├── integration/
│   ├── performance/
│   ├── test_main.py
│   └── unit/
│
├── configs/
│   ├── deployment/
│   ├── model_configs/
│   └── ocr_configs/
│
├── monitoring/
│   ├── __init__.py
│   ├── dashboards/
│   ├── health_check.py
│   └── metrics.py
│
├── data/
├── logs/
├── docs/
└── venv/
```

- **src/** – kod źródłowy aplikacji (API, core, modele, konfiguracje, prompty, utils)
- **scripts/** – skrypty narzędziowe: setup, walidacja, pobieranie modeli, migracje, benchmark
- **tests/** – testy jednostkowe, integracyjne, performance, fixtures
- **configs/** – konfiguracje deploymentu, modeli, OCR
- **monitoring/** – monitoring, health-check, metryki, dashboardy
- **data/** – dane wejściowe/wyjściowe
- **logs/** – logi aplikacji
- **docs/** – dokumentacja

## Najważniejsze komendy Makefile

- `make install` – instalacja zależności produkcyjnych
- `make install-dev` – instalacja zależności developerskich + pre-commit
- `make setup` – pełny setup środowiska
- `make run` – uruchomienie lokalnie (FastAPI/Uvicorn)
- `make docker-build` – budowa obrazu Docker
- `make docker-run` – uruchomienie Dockera
- `make docker-dev` – uruchomienie środowiska developerskiego w Dockerze
- `make docker-stop` – zatrzymanie kontenerów Docker
- `make test` – testy
- `make test-cov` – testy z pokryciem kodu
- `make lint` – lintowanie (flake8, mypy, black, isort)
- `make format` – autoformatowanie kodu
- `make clean` – czyszczenie środowiska
- `make validate` – walidacja instalacji
- `make download-models` – pobranie modeli OCR/LLM
- `make benchmark` – benchmark modeli/algorytmów

## Wymagania

- Python 3.9+
- Docker, docker-compose (do uruchomienia w kontenerze)
- (Opcjonalnie) GPU z min. 8GB VRAM dla modeli LLM

## Dokumentacja

Dokładna dokumentacja znajduje się w katalogu `docs/`.

---

Masz pytania lub chcesz zgłosić błąd? Otwórz issue lub napisz na contact@finofficer.com

