← Open Source
renatoviolin

next_word_prediction

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

ApplicationsResearch & knowledgeWrappersPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
749
Stars
137
Forks
+1
This week
1
Contributors
Created 2020-05-24 · Updated 2026-10-13 · #14130 today
Top developers
renatoviolin
README

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.

Running

cd web-app
python app.py

Open your browser http://localhost:8000

Nearby in the ranking
Similar items