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