xu1998hz commited on
Commit
0ca1c5a
1 Parent(s): 30e2a47

Update sescore.py

Browse files
Files changed (1) hide show
  1. sescore.py +2 -6
sescore.py CHANGED
@@ -122,12 +122,8 @@ class SEScore(evaluate.Metric):
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
- print("Config name is not supported!")
131
 
132
  def _compute(self, predictions, references, gpus=None, progress_bar=False):
133
  if gpus is None:
122
  from huggingface_hub import snapshot_download
123
  # initialize roberta into str2encoder
124
  comet.encoders.str2encoder['RoBERTa'] = robertaEncoder
125
+ destination = snapshot_download(repo_id="xu1998hz/sescore_english_mt", revision="main")
126
+ self.scorer = load_from_checkpoint(f'{destination}/checkpoint/sescore_english_mt.ckpt')
 
 
 
 
127
 
128
  def _compute(self, predictions, references, gpus=None, progress_bar=False):
129
  if gpus is None: