Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
This model is funetune version of Codebert in robert. On CodeSearchNet.
|
2 |
+
###
|
3 |
+
Quick start:
|
4 |
+
|
5 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
6 |
+
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("addy88/programming-lang-identifier")
|
8 |
+
|
9 |
+
model = AutoModelForSequenceClassification.from_pretrained("addy88/programming-lang-identifier")
|
10 |
+
|
11 |
+
input_ids = tokenizer.encode(CODE_TO_IDENTIFY)
|
12 |
+
logits = model(input_ids)[0]
|
13 |
+
|
14 |
+
language_idx = logits.argmax() # index for the resulting label
|
15 |
+
###
|
16 |
+
|
17 |
+
|
18 |
+
CodeSearchNet citation
|
19 |
+
Details
|
20 |
+
@article{husain_codesearchnet_2019,
|
21 |
+
title = {{CodeSearchNet} {Challenge}: {Evaluating} the {State} of {Semantic} {Code} {Search}},
|
22 |
+
shorttitle = {{CodeSearchNet} {Challenge}},
|
23 |
+
url = {http://arxiv.org/abs/1909.09436},
|
24 |
+
urldate = {2020-03-12},
|
25 |
+
journal = {arXiv:1909.09436 [cs, stat]},
|
26 |
+
author = {Husain, Hamel and Wu, Ho-Hsiang and Gazit, Tiferet and Allamanis, Miltiadis and Brockschmidt, Marc},
|
27 |
+
month = sep,
|
28 |
+
year = {2019},
|
29 |
+
note = {arXiv: 1909.09436},
|
30 |
+
}
|