Giter Site home page Giter Site logo

detsutut / ama-bot Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 1.24 MB

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: GNU General Public License v3.0

Batchfile 0.57% Python 9.10% HTML 49.95% JavaScript 36.47% CSS 3.91%
nlp qa-system data-science transformers natural-language-processing question-answering web-application python-gui

ama-bot's Introduction

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.