Spaces:
Sleeping
title: RAG ChatBOT
emoji: π
colorFrom: pink
colorTo: pink
sdk: docker
pinned: false
short_description: This is a RAG Based ChatBOT by Mohammed Adil.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
RAG Based Chatbot
The RAG-based AI ChatBot is designed to streamline information retrieval from lengthy PDF files, catering to professionals like Researchers, Teachers, Engineers, and anyone. Utilizing Pinecone Vector Database, Gemini API, and Sarvam AI, it generates relevant answers from internal documents. It also generates speech from the response using an LLM. Built with Streamlit for the frontend and FastAPI for the backend, the chatbot leverages Langchain to handle queries efficiently. The project offers fast and accurate insights, optimizing document-based research and decision-making processes.
The primary data of this project is based on Chapter 11 - Sound, Book Science of CBSE class 9th. To change the data for personal use, open the file named "api.py", go to line 164, and instead of "./data/ncert_data.pdf", paste the filepath of your document. Rerun the script, and your program is good to go.
Click to watch the YouTube Video
π» Built with
Python is used as the main language to build this project.
Python Libraries mainly used in the project:
- Streamlit Check here
- Langchain Check here
- FastAPI Check here
APIs used in the project:
- Sarvam AI Text to Speech Check here
- Google Gemini 1.5 Flash Check here
- Pinecone Vector Database Check here
Version control tool and containerization technologies:
- Docker Check here
- GitHub Check here
π§ Features
Here are some of the project's best features:
- Completely built with Python.
- Agent based query handling.
- Containerized whole project using Docker.
- Support for long content files.
- Free and open-source resources used to built.
π οΈ Installation Steps
By Basic Way
Clone the repo
git clone https://github.com/aadil080/Sarvam-ML-Assignment.gitChange the working directory and install the requirements
pip install -r requirements.txtCreate & add environment variables in the ".env" file
PINECONE_API_KEY = <your_pinecone_index_api_key> PINECONE_INDEX_NAME = <your_pinecone_name> GOOGLE_API_KEY = <your_google_gemini_1.5_flash_api_key> SARVAM_API_KEY = <your_sarvam_ai_text_to_speech_api_key>Execute the bash file
bash start.sh
Using Docker
Clone the repo
git clone https://github.com/aadil080/Sarvam-ML-Assignment.gitCreate & add environment variables in the ".env" file
PINECONE_API_KEY = <your_pinecone_index_api_key> PINECONE_INDEX_NAME = <your_pinecone_name> GOOGLE_API_KEY = <your_google_gemini_1.5_flash_api_key> SARVAM_API_KEY = <your_sarvam_ai_text_to_speech_api_key>Execute the Docker image creation command
docker build -t <image_name> . # here period represents the dockerfile pathCreate a new container from the created image
docker run -p 8000:80 <image_name>
Usage
After all the above steps, open your browser on the same machine and type the address below:
http://localhost:8501
π‘οΈ License
This project is licensed under the Apache-2.0 license.