End-to-End text sumarization, QAs generation using flask.

Overview

Help-Me-Read

A web application created with Flask + BootStrap + HuggingFace 🤗 to generate summary and question-answer from given input text. It uses T5 (Text-To-Text Transfer Transformer) for summaries and 'Question Generation using transformers' for question answer generation. For deployment gunicorn(python wsgi server) is used.

Some details:

This application is created with flask(a python microframework), for NLP models HuggingFace is used and for styling and other purposses HTML+CSS+Javascript is used. The goal was to help user read their text, it can be a blog text, some long passage etc. This application takes advantage of multitask model such as T5 to generate abstractive summary, generate questions from the given text and verify thier answers using a NLP technique called Semantic textual similarity (MRPC in short). To get started, user needs to input some text they want to read, then can summarize the given text or also can generate questions based on the texts summary. User can later attend the questions generated to verify their knowledge about the text and can also get results of they did from the model. Models are quantized to save space and increase performance.

Requirements

python 3.9 or above
pytorch 1.8.1 or above
transformers 4.4.2 or above

Installation

  • Install conda/miniconda.
  • Inside Anaconda prompt create a new env $ conda create --name helpmeread_env
  • Activate the env $ conda activate helpmeread_env
  • Upgrade pip $ pip install -U pip
  • Install dependencies $ pip install -r requirements.txt --no-cache-dir
  • Finally Install punkt $ python -m nltk.downloader punkt
  • DONE!!.

Run

  • From Anaconda prompt cd to the directory and hit gunicorn --bind 0.0.0.0:5000 wsgi:app
  • Alternative. if gives error run using python wsgi.py

Note: When running this for the first time models will be downloaded(~400mb).

Docker Installation

  • Build image using docker build --tag helpmeread:1.3 .
  • Run the image as a container docker run --publish 5000:5000 --detach --name hmr helpmeread:1.3
  • Visit the application in browser at localhost:5000

Update

  • Support for newer pytorch, transformers versions.

Screens

1 2

You might also like...
This repository contains a lot of short scripting programs implemented both in Python (Flask) and TypeScript (NodeJS).

fast-scripts This repository contains a lot of short scripting programs implemented both in Python (Flask) and TypeScript (NodeJS). In python These wi

A project for Perotti's MGIS350 for incorporating Flask
A project for Perotti's MGIS350 for incorporating Flask

MGIS350_5 This is our project for Perotti's MGIS350 for incorporating Flask... RIT Dev Biz Apps Web Project A web-based Inventory system for company o

This is the Halloween edition of my Flask Greeting App - HAPPY HALLOWEEEN EVERYONE! :)
This is the Halloween edition of my Flask Greeting App - HAPPY HALLOWEEEN EVERYONE! :)

HalloweenGreetingApp HAPPY HALLOWEEN EVERYONE! :) This is the Halloween Edition of my Flask Greeting App! Please note, this application is mean to be

Flask-built web application that simulates a time and cost calculator for charging Electric Vehicles.

ev_charging_calculator Flask-built web application that simulates a time and cost calculator for charging Electric Vehicles. The project aims to simul

Magenta: Music and Art Generation with Machine Intelligence
Magenta: Music and Art Generation with Machine Intelligence

Magenta is a research project exploring the role of machine learning in the process of creating art and music. Primarily this involves developing new

The next generation Canto RSS daemon

Canto Daemon This is the RSS backend for Canto clients. Canto-curses is the default client at: http://github.com/themoken/canto-curses Requirements De

Procedural 3D data generation pipeline for architecture
Procedural 3D data generation pipeline for architecture

Synthetic Dataset Generator Authors: Stanislava Fedorova Alberto Tono Meher Shashwat Nigam Jiayao Zhang Amirhossein Ahmadnia Cecilia bolognesi Dominik

python DroneCAN code generation, interface and utilities

UAVCAN v0 stack in Python Python implementation of the UAVCAN v0 protocol stack. UAVCAN is a lightweight protocol designed for reliable communication

Hopefully the the next-generation backend server of bgm.tv

Hopefully the the next-generation backend server of bgm.tv

Owner
Ankush Kuwar
Just a tech.
Ankush Kuwar
An end-to-end Python-based Infrastructure as Code framework for network automation and orchestration.

Nectl An end-to-end Python-based Infrastructure as Code framework for network automation and orchestration. Features Data modelling and validation. Da

Adam Kirchberger 15 Oct 14, 2022
An Agora Python Flask token generation server

A Flask Starter Application with Login and Registration About A token generation Server using the factory pattern and Blueprints. A forked stripped do

Nii Ayi 1 Jan 21, 2022
program to store and update pokemons using SQL and Flask

Pokemon SQL and Flask Pokemons api in python. Technologies flask pymysql Description PokeCorp is a company that tracks pokemon and their trainers arou

Sara Hindy Salfer 1 Oct 20, 2021
Flames Calculater App used to calculate flames status between two names created using python's Flask web framework.

Flames Finder Web App Flames Calculater App used to calculate flames status between two names created using python's Flask web framework. First, App g

Siva Prakash 4 Jan 2, 2022
Python client SDK designed to simplify integrations by automating key generation and certificate enrollment using Venafi machine identity services.

This open source project is community-supported. To report a problem or share an idea, use Issues; and if you have a suggestion for fixing the issue,

Venafi, Inc. 13 Sep 27, 2022
Print 'text color' and 'text format' on Term with Python

term-printer Print 'text color' and 'text format' on Term with Python ※ It may not work depending on the OS and shell used. PIP $ pip install term-pri

ななといつ 10 Nov 12, 2022
Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

shironeko(Hazel) 4 Jan 1, 2022
NASH 2021 project... this may or may not end up working 🤷‍♂️

wavespace synthesiser this is my NASH 2021 project, which may or may not end up working ??‍♂️ what is going on? imagine you have a big folder of audio

Ben Hayes 12 May 17, 2022
Integration of Hotwire's Turbo library with Flask.

turbo-flask Integration of Hotwire's Turbo library with Flask, to allow you to create applications that look and feel like single-page apps without us

Miguel Grinberg 240 Jan 6, 2023
Educational Repo. Used whilst learning Flask.

flask_python Educational Repo. Used whilst learning Flask. The below instructions will be required whilst establishing as new project. Install Flask (

Jordan 2 Oct 15, 2021