A lightweight LLM-based tool for document analysis. Upload PDFs or text files and ask questions to get AI-powered insights, summaries, and key information.
- Upload & Analyze Documents: Easily upload PDF or text files for analysis.
- AI-powered Q&A & Summarization: Get answers to your questions and summaries generated by advanced AI models.
- Fast & User-friendly: Simple web interface for quick interactions.
- Python
- LangChain β for orchestrating document processing and LLM interactions.
- mistral API β for enabling advanced natural language processing and understanding.
- Streamlit β for building an interactive, web-based user interface.
Experience the application at ai-doc-reader.streamlit.app
-
Document Upload:
Users upload PDF or plain text documents through the Streamlit interface. -
Text Extraction:
The backend parses and extracts text from the uploaded files. -
LLM Processing:
Extracted content is passed through LangChain pipelines, which interact with the OpenAI API to:- Summarize content
- Answer user questions
- Extract key information
-
User Interaction:
Results (summaries, answers, highlights) are displayed immediately in the Streamlit app.
-
Frontend:
Built with Streamlit, providing a modern, reactive UI for uploads and queries. -
Backend:
Python-based, using LangChain to structure LLM tasks and OpenAI for processing. The backend handles:- File parsing and validation
- Query routing to LLM
- Result formatting
-
Extensibility:
The project is modular, allowing easy integration of new LLM providers, custom analytics, or additional file formats.
- Support for analyzing multiple documents simultaneously.
- Enhanced NLP analytics (topic modeling, entity extraction).
- Exportable analysis reports.
-
Clone the Repository
git clone https://github.com/Sayeem3051/document-analysis.git cd document-analysis -
Install Dependencies
- Requires Python 3.9+.
- Install common dependencies (exact requirements file not detected, but typical packages are):
pip install streamlit langchain openai
-
Configure OpenAI API Key
- Obtain your API key from mistral.ai.
- Set it as an environment variable:
export mistral_API_KEY='your-api-key'
-
Run the Application
streamlit run app.py
(Replace
app.pywith the main script name if different.)
- Open the web interface.
- Upload a document (PDF or text).
- Ask questions or request a summary.
- Instantly view insights and answers.
Contributions are welcome! Please open issues or pull requests for new features, bug fixes, or improvements.
This tool leverages cutting-edge LLMs and modern Python libraries to make document analysis easy and powerful for everyone!