-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
67 lines (56 loc) · 1.96 KB
/
.env.example
File metadata and controls
67 lines (56 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# ============================================
# OCR Form Extraction System - Environment
# ============================================
# Copy this file to .env and fill in your values
# ===== APPLICATION =====
APP_NAME=FormExtract AI
APP_ENV=development
# Options: development, staging, production
DEBUG=true
LOG_LEVEL=INFO
# Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
# ===== SERVER =====
BACKEND_HOST=0.0.0.0
BACKEND_PORT=8000
FRONTEND_PORT=8501
ALLOWED_ORIGINS=http://localhost:8501,http://127.0.0.1:8501
# ===== DATABASE (PostgreSQL) =====
# Format: postgresql://user:password@host:port/database
DB_HOST=localhost
DB_PORT=5432
DB_USER=ocr_user
DB_PASSWORD=1234567890
DB_NAME=ocr_system
# Full URL constructed from above (or set directly)
# DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
# ===== GEMINI AI =====
GEMINI_API_KEY=YOUR_GEMINI_API_KEY
GEMINI_MODEL=gemini-2.5-flash-lite
# ===== STORAGE PATHS =====
# Relative to project root
UPLOAD_DIR=storage/uploads
PROCESSED_DIR=storage/processed
EXPORT_DIR=storage/exports
# ===== FILE UPLOAD LIMITS =====
MAX_UPLOAD_SIZE_MB=20
ALLOWED_EXTENSIONS=png,jpg,jpeg,pdf
# ===== OCR SETTINGS =====
OCR_MAX_IMAGE_DIMENSION=2000
# Max pixel dimension before resizing (CPU optimization)
OCR_INFERENCE_METHOD=azure
# Options: azure (Azure Document Intelligence), hf (HuggingFace local - legacy)
# ===== AZURE DOCUMENT INTELLIGENCE =====
AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT=YOUR_AZURE_ENDPOINT
AZURE_DOCUMENT_INTELLIGENCE_KEY=YOUR_AZURE_INTELLIGENCE_KEY
AZURE_DOCUMENT_INTELLIGENCE_MODEL=prebuilt-layout
# Options: prebuilt-layout (full extraction), prebuilt-read (text only)
# ===== PREPROCESSING SETTINGS =====
PREPROCESSING_APPLY_DESKEW=true
PREPROCESSING_APPLY_BINARIZE=true
PREPROCESSING_TARGET_SIZE_MB=2.0
# ===== EXTRACTION SETTINGS =====
CONFIDENCE_HIGH_THRESHOLD=0.85
CONFIDENCE_MEDIUM_THRESHOLD=0.60
# ===== EXPORT SETTINGS =====
EXPORT_PDF_AUTHOR=FormExtract AI
EXPORT_EXCEL_SHEET_NAME=Extracted Data