PDF Chatbot is a Streamlit web application that enables users to upload PDF files, pose questions related to the content of the PDF, and receive responses from a chatbot powered by OpenAI's GPT-3 model.
- Upload PDF files.
- Extract text from uploaded PDFs.
- Pose questions to the chatbot.
- View answers generated by the chatbot.
- Post question and answers to Slack channel.
-
Clone the repository:
-
Navigate to the project directory:
-
Install dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
-
Access the app in your web browser at
http://localhost:8501
.
- Upload a PDF file using the file uploader in the sidebar.
- Once the PDF is uploaded, you can pose questions in the chatbot section.
- Click the "Ask" button to receive answers from the chatbot.
- The answer will be displayed in the middle of the page.
Ensure to set the following environment variables in a .env
file in the root directory:
OPENAI_API_KEY
: Your OpenAI API key.SLACK_TOKEN
: Your Slack API token.SLACK_CHANNEL_ID
: The ID of the Slack channel where you want to post results.