A machine learning-based question answering system using transformer models like BERT. Automatically answers questions from text passages with applications in education, customer support, and information retrieval.
- 📄 PDF text extraction using
PyMuPDF(fitz) - 🧠 BERT model (fine-tuned on SQuAD) for question answering
- ⚡ Fast answers with Hugging Face
pipeline - 🔧 Simple command-line interface
-
Clone the Repository:
git clone https://github.com/yourusername/User-Question-Asnwering-Model.git
cd User-Question-Asnwering-Model
-
Install Required Packages:
pip install torch transformers PyMuPDF
pip install -r requirements.txt
-
Code Editors:
You can use any code editor, but it's recommended to use:
-
VS Code (Lightweight, Python support, integrated terminal)
-
PyCharm (Feature-rich IDE)
Make sure to select the correct Python interpreter from your virtual environment.
-
-
Running the Program:
Ensure your desired PDF file (e.g., sample_data.pdf) is in the same folder as user_qa.py
Run the python code in terminal.