Norwegian T5 - 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-dev2 on huggingface.co
4
Total runs
-1
24-hour runs
-1
3-day runs
-2
7-day runs
1
30-day runs
More Information About nb-nn-dev2 huggingface.co Model
nb-nn-dev2 huggingface.co is an AI model on huggingface.co that provides nb-nn-dev2's model effect (), which can be used instantly with this pere nb-nn-dev2 model. huggingface.co supports a free trial of the nb-nn-dev2 model, and also provides paid use of the nb-nn-dev2. Support call nb-nn-dev2 model through api, including Node.js, Python, http.
nb-nn-dev2 huggingface.co is an online trial and call api platform, which integrates nb-nn-dev2's modeling effects, including api services, and provides a free online trial of nb-nn-dev2, you can try nb-nn-dev2 online for free by clicking the link below.
pere nb-nn-dev2 online free url in huggingface.co:
nb-nn-dev2 is an open source model from GitHub that offers a free installation service, and any user can find nb-nn-dev2 on GitHub to install. At the same time, huggingface.co provides the effect of nb-nn-dev2 install, users can directly use nb-nn-dev2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.