Norwegian mT5 - Translation Bokmål Nynorsk - Development
Description
This is the development version of the Bokmål-Nynorsk translator. If you want something that is stable, Please do run
this version
instead.
Here is an example of how to use the model from Python
# Import librariesfrom transformers import T5ForConditionalGeneration, AutoTokenizer
model = T5ForConditionalGeneration.from_pretrained('pere/nb-nn-dev',from_flax=True)
tokenizer = AutoTokenizer.from_pretrained('pere/nb-nn-dev')
#Encode the text
text = "Hun vil ikke gi bort sine personlige data."
inputs = tokenizer.encode(text, return_tensors="pt")
outputs = model.generate(inputs, max_length=255, num_beams=4, early_stopping=True)
#Decode and print the resultprint(tokenizer.decode(outputs[0]))
Or if you like to use the pipeline instead
# Set up the pipelinefrom transformers import pipeline
translator = pipeline("translation", model='pere/nb-nn-dev')
# Do the translation
text = "Hun vil ikke gi bort sine personlige data."print(translator(text, max_length=255))
Runs of pere nb-nn-dev on huggingface.co
30
Total runs
1
24-hour runs
2
3-day runs
5
7-day runs
24
30-day runs
More Information About nb-nn-dev huggingface.co Model
nb-nn-dev huggingface.co is an AI model on huggingface.co that provides nb-nn-dev's model effect (), which can be used instantly with this pere nb-nn-dev model. huggingface.co supports a free trial of the nb-nn-dev model, and also provides paid use of the nb-nn-dev. Support call nb-nn-dev model through api, including Node.js, Python, http.
nb-nn-dev huggingface.co is an online trial and call api platform, which integrates nb-nn-dev's modeling effects, including api services, and provides a free online trial of nb-nn-dev, you can try nb-nn-dev online for free by clicking the link below.
nb-nn-dev is an open source model from GitHub that offers a free installation service, and any user can find nb-nn-dev on GitHub to install. At the same time, huggingface.co provides the effect of nb-nn-dev install, users can directly use nb-nn-dev installed effect in huggingface.co for debugging and trial. It also supports api for free installation.