As said above, I think predicting on a single text input would definitely be useful.
@nickl, did you add those functions to the model class or why are they using
self as argument? It might be better to just add them to the script for now. Also, you should be able to just load the final model, without loading the encoder and classifier separately.
For the tokenization, you probably don’t need to partition by cores for a single text input.
Looks good otherwise.
I’m traveling from today for a week, so will be less responsive. Feel free to submit a PR once it’s ready and I’ll take a look at it once I’m back or someone else can in the meantime.