Savarkar-GPT is an AI-powered chatbot designed to answer questions about the ideology and works of Vinayak Damodar Savarkar. By leveraging Savarkar's books and writings, this project creates a knowledge base that allows users to explore his thoughts and philosophy interactively.
- AI-Powered Chatbot: Ask questions about Savarkar's ideology, writings, and philosophy.
- Knowledge Base: Built using Savarkar's books, processed into a searchable database.
- Streamlit UI: A user-friendly interface for interacting with the chatbot.
- Flask API: Backend API to handle queries and generate responses.
savarkar-gpt/
├── main.py # Flask API backend
├── ui.py # Streamlit-based user interface
├── pdf_loader.py # Utility to load and process PDF files
├── embedding_utils.py # Embedding manager for ChromaDB
├── config.py # Configuration file for models and paths
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Follow these steps to set up and run the project:
git clone https://github.com/your-username/savarkar-gpt.git
cd savarkar-gpt
pip install -r requirements.txt
Ensure ChromaDB is installed and configured. The project uses ChromaDB for managing the knowledge base.
Place the PDF files of Savarkar's books in the project directory. Update the pdf_path
in main.py
to point to the correct file.
Start the backend API:
python main.py
The API will run at http://127.0.0.1:5000
.
Start the user interface:
streamlit run ui.py
The UI will be available at http://localhost:8501
.
pdf_loader.py
extracts text from Savarkar's books and splits it into manageable chunks.
- The text chunks are stored in a ChromaDB collection for efficient querying.
- The Flask API processes user queries, retrieves relevant text from the knowledge base, and generates responses.
- A simple and interactive interface for users to ask questions and view responses.
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.
For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See LICENSE
for more details.