Skip to content

A modern and lightweight NLP interface for Question-Answering systems and more. Fork this project to showcase your Python models with elegant web applications in no time!

License

Notifications You must be signed in to change notification settings

detsutut/ama-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo B O T

AMA (Ask Me Anything) Bot

A modern and lightweight NLP interface for Question-Answering systems and more.
Fork this project to showcase your Python models with elegant web application in no time!
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. License
  6. Contact
  7. Acknowledgments

About The Project

Python is one the trending programming languages to build and run Natural Language Processing pipelines. However, while programming a simple GUI framework is not much of a difficult task in Python, building a modern and nice interface can be a real nightmare, involving heavy external libraries and steep learning curves.

This projects aims to provide a simple environment to showcase Huggingface NLP Models internally with modern and well-designed user interfaces. By binding Python with HTML, CSS and Javascript with Eel (a little Python library for making simple Electron-like apps), this environment can be easily extended by those who are familiar with web design to build amazing web application within a few hours, with almost no additional effort.

With this aim in mind, I decided to implement a Qustion-Answering (QA) bot, called "Ask Me Anything (AMA) Bot" and based on Deepset's RoBERTa implementation , hosted on Huggingface and trained on SQuAD 2.0 for extractive QA.

Example

(back to top)

Built With

This project is mainly written in Python+Javascript and built with:

(back to top)

Getting Started

To get a local copy of the AMA Bot up and running follow these simple example steps.

Prerequisites

This project depends on two Python Modules that must be installed in your virtual environment before running the main script.

  • huggingface transformers
    python -m pip install transformers
  • eel
    python -m pip install eel

Installation

  1. Copy this repository
  2. Activate the virtual environment where Python Modules are installed
  3. Run the main script
    python main.py

You can also create a runnable batch file on Windows. Check the gui.bat template provided and change the path to point to your target virtual environment.

(back to top)

Usage

The way extractive QA bots work is simple.

  1. The user provides the context, which is usually a relatively long text that is supposed to include the answers to the user's questions.
  2. The user formulates a question and press the ask button.
  3. The model will scan the context and output its guess about the answer, which will be part of the context itself. The answer comes with a confidence core, which is an indicator of how reliable the model's prediction is.

(back to top)

Roadmap

  • Basic implementation
  • Confidence Score
  • Answer highlighting in context
  • Uploading different checkpoint

See the open issues for a full list of proposed features (and known issues).

(back to top)

License

Distributed under the GPL-3 License. See LICENSE.txt for more information.

(back to top)

Contact

Tommaso Mario Buonocore
LinkedIn Gmail

Project Link: https://github.com/detsutut/qa-webgui

(back to top)

Acknowledgments

Gratitude for support, assistance and inspiration goes to:

(back to top)

About

A modern and lightweight NLP interface for Question-Answering systems and more. Fork this project to showcase your Python models with elegant web applications in no time!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published