Spaces:
Sleeping
Sleeping
ronaldahmed
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,12 @@ from evaluate.utils import launch_gradio_widget
|
|
6 |
|
7 |
|
8 |
def caller(text,dataset="pubmed"):
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
|
17 |
|
|
|
6 |
|
7 |
|
8 |
def caller(text,dataset="pubmed"):
|
9 |
+
metric = evaluate.load("ronaldahmed/ccl_win")
|
10 |
+
res = metric.compute(predictions=preds,dataset=dataset,use_aggregator=False,device="cpu",batch_size=16)
|
11 |
+
total = len(res["loc_coh_ccl"])
|
12 |
+
results = [{"coh_ccl_window":res["loc_coh_ccl"][i]} for i in range(total)]
|
13 |
+
res = "CCL per sample=" + str(results)
|
14 |
+
return res
|
15 |
|
16 |
|
17 |
|