This tool helps you:
- Extract text from PDF files using a selected OCR engine
- Convert that text into structured metadata using an LLM
- Store that metadata in our database
- Search texts in our database based on keywords
More information can be found on OpenAPI (the automatic interactive documentation systems).
Follow these steps to run the application:
-
Create a Python virtual environment
python3 -m venv myenv
-
Activate the virtual environment
source myenv/bin/activate # macOS/Linux
myenv\Scripts\activate.bat # Windows CMD
myenv\Scripts\Activate.ps1 # Windows PowerShell- Install all dependencies
pip install -r requirements.txt- Set Environment Variables
- APP_ENV, DEBUG, HOST, PORT
- DATABASE_URL
- OPENAI_API_KEY
- MISTRAL_API_KEY
- CORS_ORIGINS
- FRONTEND_DIST_DIR
- ELASTICSEARCH_URL
-
Run the application Run
- fastapi dev src/backend/main.py
- python src/frontend/frontend.py
-
Understand the application
- Documentation at http://127.0.0.1:8000/docs
- Server (FastAPI) started at http://127.0.0.1:8000
- Frontend (NiceGUI) ready to go on http://localhost:8080, and http://10.134.128.10:8080
- Click on "Process Data" in frontend to see functionality (Search functionality to be added)
- Mistral – Lightweight, fast OCR
- ChatGPT – OpenAI GPT-4-based extraction