FFFFAHHH commited on
Commit
66bd942
·
verified ·
1 Parent(s): bc3015d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -1
README.md CHANGED
@@ -1,8 +1,8 @@
1
- Markdown
2
  ---
3
  language:
4
  - en
5
  - code
 
6
  tags:
7
  - pytorch
8
  - text-classification
@@ -77,6 +77,11 @@ class GraphCodeBERTForClassification(nn.Module):
77
  base_model = AutoModel.from_pretrained("microsoft/graphcodebert-base")
78
  tokenizer = AutoTokenizer.from_pretrained("microsoft/graphcodebert-base")
79
 
 
 
 
 
 
80
  # 3. Initialize the classification model and load weights
81
  model = GraphCodeBERTForClassification(base_model)
82
  model.load_state_dict(torch.load("Detect_AI.pth", map_location=torch.device('cpu')))
 
 
1
  ---
2
  language:
3
  - en
4
  - code
5
+ license: other
6
  tags:
7
  - pytorch
8
  - text-classification
 
77
  base_model = AutoModel.from_pretrained("microsoft/graphcodebert-base")
78
  tokenizer = AutoTokenizer.from_pretrained("microsoft/graphcodebert-base")
79
 
80
+ # 3. Initialize the classification model and load weights
81
+ model = GraphCodeBERTForClassification(base_model)
82
+ model.load_state_dict(torch.load("Detect_AI.pth", map_location=torch.device('cpu')))
83
+ model.eval()kenizer = AutoTokenizer.from_pretrained("microsoft/graphcodebert-base")
84
+
85
  # 3. Initialize the classification model and load weights
86
  model = GraphCodeBERTForClassification(base_model)
87
  model.load_state_dict(torch.load("Detect_AI.pth", map_location=torch.device('cpu')))