A codespace to run the French CamemBERT language model which is a great model for text prediction based on RoBERTa architecture through a minimalist web API.
This project use the 110M parameters camembert-base
version of the model, trained with OSCAR (138 Gb of text).
Under the hood, the model is run in Docker image containing a Python + PyTorch environment.
Python dependencies can be installed thanks to this command.
install.sh
Model dependency is solved during the first run.
run.sh
GET /?pattern=Hello <mask>
The pattern
query parameter is mandatory and must contain the <mask>
occurence.
Result is a JSON string array containing word predictions sorted by probability.