I have used fasttext for language detection a few times, but I always seem to forget how to install and predict the language, so I created this little gist to remind myself of how to download, instantiate the model and predict the language of a piece of text.