talkad commited on
Commit
2a21f5b
1 Parent(s): 828328d

Removed trust_remote

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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", trust_remote_code=True)
14
- pragformer = Pragformer.from_pretrained("Pragformer/PragFormer", config=pragformer_config, trust_remote_code=True)
15
- pragformer_private = Pragformer.from_pretrained("Pragformer/PragFormer_private", config=pragformer_config, trust_remote_code=True)
16
- pragformer_reduction = Pragformer.from_pretrained("Pragformer/PragFormer_reduction", config=pragformer_config, trust_remote_code=True)
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('./HF_Pragformer/c_data.json', 'r') as f:
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):