This repository contains code and resources for building a Question Answering (QA) system.
- Python 3.7 or above
- Hugging Face Transformers library
- Wikipedia API library (for the provided sample code)
- Other dependencies as listed in the
requirements.txt
file
- Clone this repository:
- Navigate to the repository:
- Install the required dependencies:
pip install -r requirements.txt
- Change desired topics in the file as needed.
- Run the
wikipedia_data_fech.py
script to collect data from Wikipedia. This script will create adata
directory and save the data in .TXT files. - Run the
qa.py
script to use the QA system. The script will prompt you to enter a question. The script will then search for the answer in the document corpus and return the answer if found.
Please refer to the code and comments within the repository for more detailed instructions and guidance on each step.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
- Hugging Face Transformers - for providing the powerful transformer models and resources.
- Wikipedia API - for the sample code on data collection from Wikipedia.
This repository serves as a tutorial and starting point for building a QA system. It is important to customize and adapt the code, data, and approaches to suit your specific use case and requirements. The provided code and resources are not intended to be used as-is for production environments, but rather as a learning resource.