Skip to content

An operational web application capable of responding to factual queries in both Arabic and English, built using the Python programming language

License

Notifications You must be signed in to change notification settings

Heyyassinesedjari/QuestionAnsweringWebApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Domain Question Answering Web Application

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.

Getting Started (Ubuntu/Debian)

  • 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
    

High-level functional explanation

Q&A System Architecture Diagram

Document Retriever Architecture Diagram

Document Reader Architecture Diagram

Application Sequence Diagram

Video Demo

videoDemo.mp4

Project Defense Presentation (Google Slides)

https://docs.google.com/presentation/d/1vQKFpJJx6TmtOgJ8upJHEEu_9QU-tWXH/edit?usp=sharing&ouid=100061785569173216725&rtpof=true&sd=true

About

An operational web application capable of responding to factual queries in both Arabic and English, built using the Python programming language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published