next word prediction
1.0.0
Transformador generativo Pretraled 2 (GPT-2) para el modelado de idiomas utilizando la biblioteca Pytorch-Transformers.
Requiere Python> = 3.5, Pytorch> = 1.6.0, Pytorch-Transformers> = 1.2.0
pip install next-word-prediction > >> from next_word_prediction import GPT2
> >> gpt2 = GPT2 ()
> >> text = "The course starts next"
> >> gpt2 . predict_next ( text , 5 )
The course starts next [ 'week' , 'to' , 'month' , 'year' , 'Monday' ]streamlit run app/run.py