xu1998hz commited on
Commit
f5661f3
1 Parent(s): 1cf57c7

Update sescore_english_coco.py

Browse files
Files changed (1) hide show
  1. sescore_english_coco.py +2 -6
sescore_english_coco.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_coco", revision="main")
128
- self.scorer = load_from_checkpoint(f'{destination}/checkpoint/caption.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_coco", revision="main")
126
+ self.scorer = load_from_checkpoint(f'{destination}/checkpoint/caption.ckpt')
 
 
 
 
127
 
128
  def _compute(self, predictions, references, gpus=None, progress_bar=False):
129
  if gpus is None: