menikev commited on
Commit
008d100
1 Parent(s): 28ccf72

Update models/prediction_sinhala.py

Browse files
Files changed (1) hide show
  1. models/prediction_sinhala.py +4 -5
models/prediction_sinhala.py CHANGED
@@ -183,7 +183,7 @@ from faknow.evaluate.evaluator import Evaluator
183
 
184
  import torch
185
  from torch.utils.data import DataLoader
186
- testing_path = "/content/drive/MyDrive/sinhala-dataset/test_data.json"
187
 
188
  df = pd.read_json(testing_path)
189
  df.head()
@@ -191,11 +191,10 @@ df =df[:100]
191
  df["label"] = int(0)
192
  df.head()
193
  print(len(df))
194
- path = '/content/drive/MyDrive/sinhala-dataset'
195
- testing_json = "/testing.json"
196
- df.to_json(path + testing_json, orient='records')
197
 
198
- MODEL_SAVE_PATH = "/content/drive/MyDrive/models-path-improvement/last-epoch-model-2024-03-08-15_34_03_6.pth"
199
 
200
  max_len, bert = 160 , 'sinhala-nlp/sinbert-sold-si'
201
  tokenizer = TokenizerFromPreTrained(max_len, bert)
 
183
 
184
  import torch
185
  from torch.utils.data import DataLoader
186
+ testing_path = "data/test_data.json"
187
 
188
  df = pd.read_json(testing_path)
189
  df.head()
 
191
  df["label"] = int(0)
192
  df.head()
193
  print(len(df))
194
+ new_testing_json_path = "data/testing.json"
195
+ df.to_json(new_testing_json_path, orient='records')
 
196
 
197
+ MODEL_SAVE_PATH = "models/last-epoch-model-2024-03-08-15_34_03_6.pth"
198
 
199
  max_len, bert = 160 , 'sinhala-nlp/sinbert-sold-si'
200
  tokenizer = TokenizerFromPreTrained(max_len, bert)