Spaces:
Runtime error
Runtime error
Update sescore_english_coco.py
Browse files- 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 |
-
|
126 |
-
|
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:
|