Spaces:
Sleeping
Sleeping
Removed trust_remote
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ import json
|
|
10 |
deep_scc_model_args = ClassificationArgs(num_train_epochs=10,max_seq_length=300,use_multiprocessing=False)
|
11 |
deep_scc_model = ClassificationModel("roberta", "NTUYG/DeepSCC-RoBERTa", num_labels=19, args=deep_scc_model_args, use_cuda=False)
|
12 |
|
13 |
-
pragformer_config = PragFormerConfig.from_pretrained("Pragformer/PragFormer"
|
14 |
-
pragformer = Pragformer.from_pretrained("Pragformer/PragFormer", config=pragformer_config
|
15 |
-
pragformer_private = Pragformer.from_pretrained("Pragformer/PragFormer_private", config=pragformer_config
|
16 |
-
pragformer_reduction = Pragformer.from_pretrained("Pragformer/PragFormer_reduction", config=pragformer_config
|
17 |
|
18 |
|
19 |
#Event Listeners
|
@@ -24,7 +24,7 @@ name_file = ['bash', 'c', 'c#', 'c++','css', 'haskell', 'java', 'javascript', 'l
|
|
24 |
|
25 |
tokenizer = transformers.AutoTokenizer.from_pretrained('NTUYG/DeepSCC-RoBERTa')
|
26 |
|
27 |
-
with open('./
|
28 |
data = json.load(f)
|
29 |
|
30 |
def fill_code(code_pth):
|
|
|
10 |
deep_scc_model_args = ClassificationArgs(num_train_epochs=10,max_seq_length=300,use_multiprocessing=False)
|
11 |
deep_scc_model = ClassificationModel("roberta", "NTUYG/DeepSCC-RoBERTa", num_labels=19, args=deep_scc_model_args, use_cuda=False)
|
12 |
|
13 |
+
pragformer_config = PragFormerConfig.from_pretrained("Pragformer/PragFormer")
|
14 |
+
pragformer = Pragformer.from_pretrained("Pragformer/PragFormer", config=pragformer_config)
|
15 |
+
pragformer_private = Pragformer.from_pretrained("Pragformer/PragFormer_private", config=pragformer_config)
|
16 |
+
pragformer_reduction = Pragformer.from_pretrained("Pragformer/PragFormer_reduction", config=pragformer_config)
|
17 |
|
18 |
|
19 |
#Event Listeners
|
|
|
24 |
|
25 |
tokenizer = transformers.AutoTokenizer.from_pretrained('NTUYG/DeepSCC-RoBERTa')
|
26 |
|
27 |
+
with open('./c_data.json', 'r') as f:
|
28 |
data = json.load(f)
|
29 |
|
30 |
def fill_code(code_pth):
|