xu1998hz commited on
Commit
59b3c1f
1 Parent(s): 5e0c88b

Update sescore.py

Browse files
Files changed (1) hide show
  1. sescore.py +2 -1
sescore.py CHANGED
@@ -122,13 +122,14 @@ class SEScore(evaluate.Metric):
122
  from huggingface_hub import snapshot_download
123
  # initialize roberta into str2encoder
124
  comet.encoders.str2encoder['RoBERTa'] = robertaEncoder
125
- print(self.config_name)
126
  if self.config_name == "default":
127
  destination = snapshot_download(repo_id="xu1998hz/sescore_english_mt", revision="main")
128
  self.scorer = load_from_checkpoint(f'{destination}/checkpoint/sescore_english_mt.ckpt')
129
  else:
130
  destination = snapshot_download(repo_id=self.config_name, revision="main")
131
  suffix = self.config_name.split('/')[-1]
 
132
  if suffix == 'sescore_english_mt':
133
  self.scorer = load_from_checkpoint(f'{destination}/checkpoint/sescore_english_mt.ckpt')
134
  elif suffix == 'sescore_german_mt':
 
122
  from huggingface_hub import snapshot_download
123
  # initialize roberta into str2encoder
124
  comet.encoders.str2encoder['RoBERTa'] = robertaEncoder
125
+ print("config name: ", self.config_name)
126
  if self.config_name == "default":
127
  destination = snapshot_download(repo_id="xu1998hz/sescore_english_mt", revision="main")
128
  self.scorer = load_from_checkpoint(f'{destination}/checkpoint/sescore_english_mt.ckpt')
129
  else:
130
  destination = snapshot_download(repo_id=self.config_name, revision="main")
131
  suffix = self.config_name.split('/')[-1]
132
+ print("suffix: ", suffix)
133
  if suffix == 'sescore_english_mt':
134
  self.scorer = load_from_checkpoint(f'{destination}/checkpoint/sescore_english_mt.ckpt')
135
  elif suffix == 'sescore_german_mt':