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