Chatbot to respond to text queries pertaining to various Acts, Rules, and Regulations applicable to Mining industries
- Answers basic queries pertaining to anything in general like a smart chatbot.
- Answers queries accurately related to rules, regulations and information about Indian Mining Industries in a detailed manner.
To get the chatbot running locally on your own device, install Langchain and other required dependencies:
pip install langchain openai chromadb tiktoken unstructured streamlit googletrans==3.1.0a0
Head over to constants.py
and insert your own OpenAI API key.
To run the pdf_reader:
- Create a python virtual environment and a .env file
- Create and insert your own replicate api key as enviornment variable
REPLICATE_API_TOKEN = <your replicate api token>
- Finally install all the required dependencies
pip install langchain tiktoken replicate streamlit_chat pypdf faiss-cpu sentence_transformers
To run the chatbot load your preferred .txt file.
> python chatbotCore.py
Input some text:
To run the pdf reader type in the following command at your terminal after following the instructions given in the Setup section
> streamlit run <path of your folder>.venv/pdfbot.py