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.txt
file:NOTE: If you are not using a CUDA supported GPU, in
requirements.txt
line 1, changefaiss-gpu
tofaiss-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
.env
and enterHUGGINGFACEHUB_API_TOKEN=token
, replacingtoken
with your User Access Token. Save the.env
file. The.gitignore
file will ignore the.env
for 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.py
This 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.