Spaces:
Runtime error
Runtime error
Alex Cabrera
commited on
Commit
•
1216e7c
1
Parent(s):
8894e1f
fake
Browse files
model.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5 |
# from sentence_transformers import SentenceTransformer
|
6 |
|
7 |
# sentence_embed = SentenceTransformer("paraphrase-multilingual-mpnet-base-v2")
|
8 |
-
client = Critique(api_key=os.environ["INSPIREDCO_API_KEY"])
|
9 |
|
10 |
|
11 |
@model
|
@@ -24,11 +24,13 @@ def bert_score(df, ops):
|
|
24 |
d["references"] = [d.pop("label")]
|
25 |
d["target"] = d.pop(ops.output_column)
|
26 |
|
27 |
-
|
28 |
-
metric="bert_score", config={"model": "bert-base-uncased"}, dataset=eval_dict
|
29 |
-
)
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
|
33 |
|
34 |
@metric
|
|
|
5 |
# from sentence_transformers import SentenceTransformer
|
6 |
|
7 |
# sentence_embed = SentenceTransformer("paraphrase-multilingual-mpnet-base-v2")
|
8 |
+
# client = Critique(api_key=os.environ["INSPIREDCO_API_KEY"])
|
9 |
|
10 |
|
11 |
@model
|
|
|
24 |
d["references"] = [d.pop("label")]
|
25 |
d["target"] = d.pop(ops.output_column)
|
26 |
|
27 |
+
return [0] * len(eval_dict)
|
|
|
|
|
28 |
|
29 |
+
# result = client.evaluate(
|
30 |
+
# metric="bert_score", config={"model": "bert-base-uncased"}, dataset=eval_dict
|
31 |
+
# )
|
32 |
+
|
33 |
+
# return [round(r["value"], 6) for r in result["examples"]]
|
34 |
|
35 |
|
36 |
@metric
|