An operational web application capable of responding to factual queries in both Arabic and English, built using the Python programming language.
This project is a part of my Introduction to Natural Language Processing course at ENSIAS, Mohammed V University instructed by Professor Si Lhoussain Aouragh. When selecting a project for the class, I chose to focus on Question and Answering, a part of NLP. Back then, ChatGPT and Language Models were quite popular, and I was very interested in understanding how these technologies function. However, these topics were rather advanced, so my professor advised me to proceed gradually. I began with a basic Q&A project, aiming to grasp the fundamentals of NLP including comprehension, information retrieval, and answer formulation.
Every part of this project is sample code which shows how to do the following:
- Create an open-domain Arabic and English question answering system using Python.
- Implement a Document Retriever using wikipedia api.
- Implement a Document Reader using Transformers including both distilbert-base-cased-distilled-squad and AraElectra-Arabic-SQuADv2-QA through api calls to the HuggingFace server.
- Create a Messenger like web application using Flask, HTML, CSS and JavaScript.
- Install Git
sudo apt update sudo apt install git
- Navigate to the Directory
cd path/to/desired/location
- Clone this repository
git clone https://github.com/Heyyassinesedjari/QuestionAnsweringWebApp.git
- Install Conda
wget https://repo.anaconda.com/miniconda/Miniconda3-4.12.0-Linux-x86_64.sh bash Miniconda3-4.12.0-Linux-x86_64.sh source ~/.bashrc
- Creating a Conda Environment
conda create --name myenv python=3.9.12
- Activate Conda Environment and Install all requirements
conda activate myenv conda install --file path_to_requirements.txt
- Hover over to the 9th line of this file and update 'Your_Hugging_Face_API_key' in the authorization field of the headers variable with your actual Hugging Face API key.
- Run the App
python app.py