Welcome to the Document AI repository! This project is a simple FastAPI application that allows users to upload PDF or DOCX documents to a database. It generates summaries using a local LLM via Ollama and enables users to ask natural language questions about their content.
Check out the latest releases here!
- Upload Documents: Easily upload PDF or DOCX files.
- Summarization: Get concise summaries generated by a local LLM.
- Natural Language Queries: Ask questions about your documents in plain language.
- Database Storage: Store your documents securely in a database.
- User-Friendly Interface: Simple and intuitive design for a smooth user experience.
To get started with Document AI, follow these steps:
-
Clone the repository:
git clone https://github.com/athallahaiqal/document-ai.git cd document-ai
-
Set up a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
uvicorn main:app --reload
Now, you can access the application at http://127.0.0.1:8000
.
Once the application is running, you can:
- Upload your documents: Use the provided interface to upload PDF or DOCX files.
- Get summaries: After uploading, click on the "Generate Summary" button to receive a concise overview of your document.
- Ask questions: Use the input field to type your questions regarding the document's content. The system will respond with relevant answers.
This project utilizes the following technologies:
- FastAPI: A modern web framework for building APIs with Python 3.6+ based on standard Python type hints.
- Ollama: A local LLM that generates summaries and answers questions.
- Alembic: A lightweight database migration tool for use with SQLAlchemy.
- SQLAlchemy: A SQL toolkit and Object-Relational Mapping (ORM) system for Python.
- Pydantic: Data validation and settings management using Python type annotations.
- Ruff: A fast Python linter and code formatter.
- Docker: To containerize the application for easy deployment.
We welcome contributions! If you want to help improve Document AI, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your branch to your forked repository.
- Open a pull request with a clear description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, feel free to reach out:
- Author: athallahaiqal
- Email: your_email@example.com
For updates, visit our Releases section.
Thank you for checking out Document AI! We hope you find it useful for your document processing needs.