File size: 293 Bytes
5be3c0d
 
6dfe786
5be3c0d
 
 
 
6dfe786
5be3c0d
1
2
3
4
5
6
7
8
9
import transfomers
from transformers import TextClassificationPipeline

pipeline = TextClassificationPipeline(
    model=RobertaForSequenceClassification.from_pretrained(CODEBERTA_LANGUAGE_ID),
    tokenizer=RobertaTokenizer.from_pretrained(CODEBERTA_LANGUAGE_ID)
)

pipeline(CODE_TO_IDENTIFY)