A simple text editor with suggestions generated from a Cantonese GPT2 model
The model can be found here
It is a GPT2 model finetuned on a dataset of some Cantonese online novels. The model is trained on an Nvidia Quadro RTX6000 for 60hours.
The text editor was based on this.
Note: The model is not perfect. It is only trained on 700MB of data. The training data might includes inappropriate language.
- Install huggingface transformers according to the instructions here
Note: you have to install pytorch separately
- Download the model from here and put it in the directory
write-with-gpt2/gpt2-base
- Change the font size
- Undo the generated text with control z (I still haven't figured out how to properly implement an undo function, but it works for undoing the generated text)