Skip to content

Using transformers to predict next word and predict <mask> word

Notifications You must be signed in to change notification settings

autosoft-dev/next_word_prediction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next word prediction

Simple application using transformers models to predict next word or a masked word in a sentence.

The purpose is to demo and compare the main models available up to date.

The first load take a long time since the application will download all the models. Beside 6 models running, inference time is acceptable even in CPU.

Application

This app implements two variants of the same task (predict token). The first one consider the is at end of the sentence, simulating a prediction of the next word of the sentece.

The second variant is necessary to include a token where you want the model to predict the word.

Word prediction

Running

cd web-app
python app.py

Open your browser http://localhost:8000

About

Using transformers to predict next word and predict <mask> word

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 40.4%
  • HTML 38.3%
  • JavaScript 17.0%
  • CSS 4.3%