Chat with a PDF and generate a transcript of the conversation.
To run this project, please follow the steps below:
-
Clone the repository:
git clone git@github.com:MattLondon101/chatbot-pdf.git cd chatbot-pdf -
Create and activate a conda virtual environment (optional but recommended):
conda create -n env1 python=3.10 conda activate env1
-
Install the dependencies from the
requirements.txtfile:NOTE: If you are not using a CUDA supported GPU, in
requirements.txtline 1, changefaiss-gputofaiss-cpu.pip install -r requirements.txt
-
You will need a HUGGINGFACEHUB_API_TOKEN for this next step. To obtain one for free, got to https://huggingface.co/ and Sign Up for a free account. Then, go to Settings > Access Tokens. Create a New token. Then, create a file in this directory, name is
.envand enterHUGGINGFACEHUB_API_TOKEN=token, replacingtokenwith your User Access Token. Save the.envfile. The.gitignorefile will ignore the.envfor git operation.
Once you have installed the required dependencies, you can run the project using Streamlit.
To start the application, run the following command:
streamlit run app.pyThis will start the Streamlit server and open the application in your default web browser.
Transcript of conversation will be written to ./output/transcript.csv.
NOTE: ./output/transcript.csv will be deleted, then recreated upon running streamlit run app.py
This project is licensed under the MIT License.