ngohuudang commited on
Commit
047fb51
1 Parent(s): 1b76ad1

update platform

Browse files
__pycache__/gec_model.cpython-310.pyc CHANGED
Binary files a/__pycache__/gec_model.cpython-310.pyc and b/__pycache__/gec_model.cpython-310.pyc differ
 
__pycache__/gec_model.cpython-38.pyc ADDED
Binary file (14.3 kB). View file
 
__pycache__/gec_model.cpython-39.pyc CHANGED
Binary files a/__pycache__/gec_model.cpython-39.pyc and b/__pycache__/gec_model.cpython-39.pyc differ
 
__pycache__/modeling_seq2labels.cpython-310.pyc CHANGED
Binary files a/__pycache__/modeling_seq2labels.cpython-310.pyc and b/__pycache__/modeling_seq2labels.cpython-310.pyc differ
 
__pycache__/modeling_seq2labels.cpython-38.pyc ADDED
Binary file (4.13 kB). View file
 
__pycache__/modeling_seq2labels.cpython-39.pyc CHANGED
Binary files a/__pycache__/modeling_seq2labels.cpython-39.pyc and b/__pycache__/modeling_seq2labels.cpython-39.pyc differ
 
__pycache__/utils_gec.cpython-38.pyc ADDED
Binary file (6.06 kB). View file
 
__pycache__/vocabulary.cpython-38.pyc ADDED
Binary file (13 kB). View file
 
gec_model.py CHANGED
@@ -12,7 +12,11 @@ from transformers import AutoTokenizer
12
  from modeling_seq2labels import Seq2LabelsModel
13
  from vocabulary import Vocabulary
14
  from utils_gec import PAD, UNK, START_TOKEN, get_target_sent_by_edits
15
- current_dir = sys.path[0].replace('\\','/')
 
 
 
 
16
  logging.getLogger("werkzeug").setLevel(logging.ERROR)
17
  logger = logging.getLogger(__file__)
18
 
 
12
  from modeling_seq2labels import Seq2LabelsModel
13
  from vocabulary import Vocabulary
14
  from utils_gec import PAD, UNK, START_TOKEN, get_target_sent_by_edits
15
+ import os
16
+ if sys.platform == 'win32':
17
+ current_dir = sys.path[0].replace('\\','/')
18
+ else:
19
+ current_dir = os.getcwd()
20
  logging.getLogger("werkzeug").setLevel(logging.ERROR)
21
  logger = logging.getLogger(__file__)
22
 
modeling_seq2labels.py CHANGED
@@ -5,7 +5,11 @@ from transformers import AutoConfig, AutoModel, BertPreTrainedModel
5
  from transformers.modeling_outputs import ModelOutput
6
  import sys
7
  import torch
8
- current_dir = sys.path[0].replace('\\','/')
 
 
 
 
9
 
10
  def get_range_vector(size: int, device: int) -> torch.Tensor:
11
  """
 
5
  from transformers.modeling_outputs import ModelOutput
6
  import sys
7
  import torch
8
+ import os
9
+ if sys.platform == 'win32':
10
+ current_dir = sys.path[0].replace('\\','/')
11
+ else:
12
+ current_dir = os.getcwd()
13
 
14
  def get_range_vector(size: int, device: int) -> torch.Tensor:
15
  """