Create README.md

#2
by nassi - opened

To classifier a code source use

import torch
from transformers import RobertaTokenizer, RobertaConfig, RobertaModel

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = RobertaTokenizer.from_pretrained("microsoft/codebert-base")
model = RobertaModel.from_pretrained("microsoft/codebert-base")
model.to(device)

If you want more informations you can go to https://github.com/microsoft/CodeBERT

It tokenizes the source code as well

But I need a help to create a binary classification depending in the result of the tokenizer

Ready to merge
This branch is ready to get merged automatically.
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment