English
Overview
This is a web-based OCR (Optical Character Recognition) application that supports both Arabic and English text recognition. It processes PDF files and images (PNG, JPG, JPEG) using Tesseract OCR engine.
Features
- PDF and image file processing
- Multi-language support (Arabic + English)
- API key authentication system
- Admin interface for API key management
- Secure file handling with base64 encoding
- Docker containerization
Installation
- Clone the repository:
git clone https://github.com/mjaferss/ocr.git cd ocr
- Install dependencies:
pip install -r requirements.txt
- Start the application using Docker Compose:
docker-compose up -d
Usage
- Access the admin interface at
http://localhost:5000/login- Username:
root - Password:
rootroot
- Username:
- Use the static API key:
- Name:
mohammed - Key:
mk_1234567890abcdef1234567890abcdef
- Name:
- Send OCR requests:
curl -X POST \ http://localhost:5000/ocr \ -H 'X-API-Key: mk_1234567890abcdef1234567890abcdef' \ -H 'X-API-Name: mohammed' \ -F 'file=@/path/to/your/file.pdf'
Technical Stack
- Flask web framework
- SQLite database
- Tesseract OCR engine
- Docker & Docker Compose
- Bootstrap UI framework
Arabic
نظرة عامة
هذا تطبيق ويب للتعرف على النصوص (OCR) يدعم التعرف على النصوص العربية والإنجليزية. يقوم بمعالجة ملفات PDF والصور (PNG, JPG, JPEG) باستخدام محرك Tesseract OCR.
المميزات
- معالجة ملفات PDF والصور
- دعم متعدد اللغات (العربية + الإنجليزية)
- نظام مصادقة بمفاتيح API
- واجهة إدارة لمفاتيح API
- معالجة آمنة للملفات باستخدام ترميز base64
- حاويات Docker
التثبيت
- استنساخ المستودع:
git clone https://github.com/mjaferss/ocr.git cd ocr
- تثبيت المتطلبات:
pip install -r requirements.txt
- تشغيل التطبيق باستخدام Docker Compose:
docker-compose up -d
الاستخدام
- الوصول إلى واجهة الإدارة على
http://localhost:5000/login- اسم المستخدم:
root - كلمة المرور:
rootroot
- اسم المستخدم:
- استخدام مفتاح API الثابت:
- الاسم:
mohammed - المفتاح:
mk_1234567890abcdef1234567890abcdef
- الاسم:
- إرسال طلبات OCR:
curl -X POST \ http://localhost:5000/ocr \ -H 'X-API-Key: mk_1234567890abcdef1234567890abcdef' \ -H 'X-API-Name: mohammed' \ -F 'file=@/path/to/your/file.pdf'
التقنيات المستخدمة
- إطار عمل Flask
- قاعدة بيانات SQLite
- محرك Tesseract OCR
- Docker و Docker Compose
- إطار عمل Bootstrap للواجهة
اقرا ايضا n8narab
