Quanta Chatbot is a Python application designed to handle multiple files, including PDFs, for in-depth discussions. It specializes in working with research papers or lengthy documents, providing precise and contextually relevant response to user questions based on document content(s).
Follow the steps below to set up your chatbot:
-
Install Python
If you have never used Python on your computer before, make sure to download one.
-
Install dependencies
Run the following command to install the required dependencies:
pip install -r requirements.txt
-
Install other files
Sometimes, manual installations are required. For the following lines of code, please copy and paste each line into the terminal in the order given.
pip install langchain pip install -U langchain-community pip install openai chromadb streamlit pypdf2 tiktoken nltk python-docx
-
Set up your OpenAI API key
Obtain a personal API key from OpenAI and add it to your terminal environment, like this:
(For temporary usage, please contact the email at the very bottom.)
-
macOS / Linux:
export OPENAI_API_KEY='YOUR_OPEN_AI_KEY'
-
Windows:
set OPENAI_API_KEY='YOUR_OPEN_AI_KEY'
To use Quanta Chatbot, follow these steps:
-
Ensure all dependencies are installed and OpenAI API key is incorporated into the file.
-
Run the main.py file using the following command.
streamlit run main.py
-
A page will be launched on your default web browser.
NOTICE:
- At this stage, if the page shows a red screen with a "ModuleNotFound" error, please install the ones listed in the error message manually at the terminal as well, using the following template. This tends to vary by computer. Then, repeat step 2.
pip install <dependencies you need>
- If "StreamlitDuplicateElementKey" error pops up, just refresh the page once more.
- At this stage, if the page shows a red screen with a "ModuleNotFound" error, please install the ones listed in the error message manually at the terminal as well, using the following template. This tends to vary by computer. Then, repeat step 2.
-
Upload as many files as you want by dragging or selecting.
- It is intended that files MUST BE uploaded FIRST for program to run.
-
Ask questions in English about the loaded files using the chat interface.
While running the program, various errors might occur. If so, make sure to try these temporary solutions.
-
Update the problem dependencies.
pip install --upgrade <dependency being updated>
-
Ensure that your OpenAI has enough credit balance, else it won't be making successful API calls. This can be checked at (platform.openai.com)
-
Make sure to search up the error message that appears on the terminal window.
-
Hand type the terminal commands, instead of copying and pasting.
For further inquiries, please feel free to contact [email protected].