This project demonstrates how to extract text from a PDF file and perform question-answering using the BERT model from the Transformers library.
This project uses the BERT-based question-answering model to answer questions based on text extracted from a PDF file. It includes the following components:
- PDF text extraction using PyPDF2.
- Pretrained BERT model for question answering.
- Text preprocessing to clean and format the extracted text.
To use this code, follow these steps:
- Place your PDF file in the project directory or specify its path in the extract_text_from_pdf function.
- Open the Python script (main.py) and replace the PDF file path with your file.
- Run the script to extract text from the PDF and perform question answering.
You can save this content in a file named README.md
in the root directory of your GitHub repository. This single README file contains all the necessary information about your project, its setup, usage, and licensing.
-
Clone this repository to your local machine:
git clone https://github.com/9147/chatbot_model.git