This AI-driven project enables users to:
- Upload a document (PDF/DOC)
- Ask AI questions related to the content
- Generate knowledge graphs to visualize relationships within the document
- File Upload: Supports PDF and DOC formats for document processing.
- AI-Powered Q&A: Use advanced Natural Language Processing (NLP) to ask questions about the uploaded document.
- Knowledge Graphs: Automatically generate dynamic graphs to represent the documentβs key concepts and relationships.
- Backend: Python (Flask/Django/FastAPI)
- AI: OpenAI/GPT models, Natural Language Processing (NLP)
- Document Parsing:
- PDFs: PyMuPDF, pdfplumber
- DOCs: python-docx
- Knowledge Graph Generation: NetworkX, Matplotlib, Graphviz
- Frontend (if applicable): React / Angular / Vue or pure HTML, CSS, JavaScript
- Database: SQLite / PostgreSQL (if needed)
-
Clone the repository
git clone https://github.com/yourusername/yourproject.git -
Navigate to the project directory
cd yourproject -
Install the dependencies
pip install -r requirements.txt -
(Optional) Create and activate a virtual environment
python -m venv venv
source venv/bin/activate(on Windows, usevenv\Scripts\activate) -
Run the backend server
python app.py
- Run the server and open the web interface or use API endpoints.
- Upload a document (PDF/DOC).
- Ask questions about the document.
- View the generated knowledge graphs that visually represent key insights from the document.
-
POST /upload
Upload a PDF/DOC file for processing.
Example request:
curl -X POST -F "file=@yourfile.pdf" http://localhost:5000/upload -
GET /ask
Ask questions about the document.
Example request:
curl -X GET "http://localhost:5000/ask?question=What is the main topic?" -
GET /knowledge-graph
Generate a knowledge graph based on the documentβs content.
Example request:
curl -X GET http://localhost:5000/knowledge-graph
static/: Frontend assets (if applicable)templates/: HTML templates (if applicable)models/: AI model scripts and logicutils/: Utility functions (PDF parsing, graph generation)app.py: Main backend filerequirements.txt: Project dependenciesREADME.md: Project documentation
- Expand supported document formats (e.g., DOCX, TXT).
- Improve AI model accuracy.
- Enhance graph generation with better layouts and more data visualization techniques.
- Add real-time collaboration features.
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Submit a pull request.
- OpenAI GPT models
- PyMuPDF
- NetworkX
Feel free to reach out at: aadityashankar21@gmail.com