Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Roberta Inference TensorFlow

from transformers import RobertaTokenizer, TFRobertaModel
tokenizer = RobertaTokenizer.from_pretrained('roberta-base')
model = TFRobertaModel.from_pretrained('roberta-base')
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
Source by huggingface.co #
 
PREVIOUS NEXT
Tagged: #Roberta #Inference #TensorFlow
ADD COMMENT
Topic
Name
5+1 =