Wendaxu commited on
Commit
cb87d9f
1 Parent(s): 6d04456
Files changed (1) hide show
  1. sescore.py +2 -4
sescore.py CHANGED
@@ -131,10 +131,8 @@ class SEScore(evaluate.Metric):
131
  # gdown.download(url, output, quiet=False)
132
  # cmd = 'tar -xvf sescore_ckpt.gz'
133
  # os.system(cmd)
134
- cmd = "pwd"
135
- print(os.system(cmd))
136
- snapshot_download(repo_id="xu1998hz/sescore_english_mt", revision="main")
137
- self.scorer = load_from_checkpoint('sescore_english_mt/checkpoint/sescore_english_mt.ckpt')
138
 
139
  def _compute(self, sources, predictions, references, gpus=None, progress_bar=False):
140
  if gpus is None:
 
131
  # gdown.download(url, output, quiet=False)
132
  # cmd = 'tar -xvf sescore_ckpt.gz'
133
  # os.system(cmd)
134
+ destination = snapshot_download(repo_id="xu1998hz/sescore_english_mt", revision="main")
135
+ self.scorer = load_from_checkpoint(f'{destination}/checkpoint/sescore_english_mt.ckpt')
 
 
136
 
137
  def _compute(self, sources, predictions, references, gpus=None, progress_bar=False):
138
  if gpus is None: