پروژهای برای استخراج و ترجمه خودکار کتابهای PDF با استفاده از هوش مصنوعی Gemini و Django.
A project for automatic extraction and translation of PDF books using Gemini AI and Django.
برای اجرای این پروژه به موارد زیر نیاز دارید:
You need the following to run this project:
wkhtmltopdf
| Install wkhtmltopdf
sudo apt install wkhtmltopdf
git clone https://github.com/eric-py/AiTranslator.git
cd AiTranslator
python -m venv .venv
source .venv/bin/activate # Linux/Mac
.venv\Scripts\activate # Windows
pip install -r requirements.txt
docker run -p 6379:6379 --name redis redis:8.0-M02-alpine
python manage.py tailwind install
python manage.py tailwind start
cp backend/.env_file backend/.env
سپس فایل .env
را ویرایش کرده و مقادیر زیر را تنظیم کنید:
Then edit the .env
file and set the following values:
SECRET_KEY_ENV
DEBUG_MODE_ENV
EMAIL_HOST_ENV
EMAIL_HOST_USER_ENV
EMAIL_HOST_PASSWORD_ENV
GEMINI_API_KEY
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
celery -A core worker -l info -Q default,users
celery -A core beat -l info
book-translator/
├── backend/
│ ├── account/ # اپلیکیشن مدیریت کاربران | User Management App
│ ├── books/ # اپلیکیشن مدیریت کتابها | Books Management App
│ ├── core/ # تنظیمات اصلی پروژه | Core Project Settings
│ ├── dashboard/ # اپلیکیشن داشبورد | Dashboard App
│ ├── extensions/ # ابزارهای جانبی | Utility Extensions
│ ├── theme/ # تنظیمات Tailwind | Tailwind Configuration
│ └── translator/ # اپلیکیشن ترجمه | Translation App
├── frontend/
│ ├── media/ # فایلهای آپلود شده | Uploaded Files
│ ├── static/ # فایلهای استاتیک | Static Files
│ └── templates/ # قالبهای HTML | HTML Templates
└── requirements.txt # وابستگیهای Python | Python Dependencies
اطمینان حاصل کنید که Redis در حال اجراست:
Ensure Redis is running:
docker ps | grep redis
برای اجرای مجدد Redis بعد از راهاندازی سیستم:
Restart Redis after system reboot:
docker start redis
مسیرهای ضروری به صورت خودکار ساخته میشوند:
Required directories are automatically created:
frontend/media/books/files/
frontend/media/books/covers/