Calvin is a application designed to assist users in finding relevant information from technical manuals. Whether you're looking for calibration instructions, setup procedures, or troubleshooting steps, Calvin is here to help.
- Semantic Search: Calvin understands the context of your questions and finds the most relevant sections from the manuals.
- Support for Multiple Manuals: Store and search across multiple manuals from different manufacturers.
- Intuitive Interface: A simple and user-friendly web interface to ask questions and get answers.
- Powered by AI: Utilizes advanced Natural Language Processing techniques to understand and respond to user queries.
- Content Extraction: Calvin processes PDF manuals, extracting their content for easy searching. It can handle both text-based and image-based PDFs.
- Content Indexing: The extracted content is indexed using TF-IDF Vectorization, allowing for efficient and accurate searching.
- Semantic Search: When a user asks a question, Calvin computes the relevance of each section in the manuals to the query. It then presents the most relevant sections to the user.
- AI-Powered Responses: Calvin uses OpenAI's GPT model to generate human-like responses, making the interaction smooth and intuitive.
Set up manuals to be processed in structure ./Manuals/Manufacturer/Model/model.pdf
1.Build the image:
docker-compose build
2.Spin it up:
docker-compose up
- Remove containers
docker-compose down
uncomment sections from app.py and pdf_processor.py change redis to localhost in .env
- Python 3.10 or higher
- Redis server
- Docker
- Tesseract https://github.com/UB-Mannheim/tesseract/wiki
-
Clone the Repository:
git clone https://github.com/guacamole-hunter/calvin.git cd calvin
-
Set Up a Virtual Environment (recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` #install spacy python -m spacy download en_core_web_sm
-
Install Dependencies:
pip install -r requirements.txt
-
Start Redis Server: Ensure your Redis server is running. If you're new to Redis, here's a beginner-friendly guide. I am using docker so here's the command
docker run --name redis -d -p 6379:6379 redis:6.0
-
Run Calvin:
python app.py
-
Open your web browser and go to
http://127.0.0.1:5000/
. You should see Calvin's interface, ready to assist you!
- Upload Manuals: Before asking questions, ensure you've included the relevant manuals in the root folder with correct file structure. Calvin will process and index them for searching.
- Ask Away: Type in your question in the provided text box and hit "Send". Calvin will search through the manuals and provide you with instructions based on the most relevant information.
If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.
We welcome contributions! If you'd like to improve Calvin, please fork the repository, make your changes, and submit a pull request.
This project is licensed under the APACHE License. See the LICENSE file for details.