Spaces:
Sleeping
Sleeping
DWizard
commited on
Commit
•
e0457d9
1
Parent(s):
0fca289
add requirement make comet working(cannot use gpu)
Browse filesFormer-commit-id: ca89e847b762a3ad06a129f1a4d6cb81dde572f0
- evaluation/scores/scores.py +1 -1
- requirement.txt +2 -0
evaluation/scores/scores.py
CHANGED
@@ -5,7 +5,7 @@ def COMETscore(src, mt, ref):
|
|
5 |
data = [{"src":src, "mt":mt, "ref":ref}]
|
6 |
model_path = download_model("Unbabel/wmt22-comet-da")
|
7 |
model = load_from_checkpoint(model_path)
|
8 |
-
model_output = model.predict(data, batch_size = 8, gpus=
|
9 |
return model_output
|
10 |
|
11 |
def BLEUscore(sys, refs):
|
|
|
5 |
data = [{"src":src, "mt":mt, "ref":ref}]
|
6 |
model_path = download_model("Unbabel/wmt22-comet-da")
|
7 |
model = load_from_checkpoint(model_path)
|
8 |
+
model_output = model.predict(data, batch_size = 8, gpus=0)
|
9 |
return model_output
|
10 |
|
11 |
def BLEUscore(sys, refs):
|
requirement.txt
CHANGED
@@ -36,3 +36,5 @@ tqdm==4.65.0
|
|
36 |
typing_extensions==4.5.0
|
37 |
urllib3==1.26.15
|
38 |
yarl==1.8.2
|
|
|
|
|
|
36 |
typing_extensions==4.5.0
|
37 |
urllib3==1.26.15
|
38 |
yarl==1.8.2
|
39 |
+
sacrebleu==2.3.1
|
40 |
+
unbabel-comet==2.1.0
|