Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import evaluate | |
| from evaluate.utils import launch_gradio_widget | |
| def caller(text,dataset="pubmed"): | |
| metric = evaluate.load("ronaldahmed/ccl_win") | |
| res = metric.compute(predictions=[text],dataset=dataset,use_aggregator=False,device="cpu",batch_size=16) | |
| ress = "CCL=" + str(res["loc_coh_ccl"][0]) | |
| return ress | |
| gradio_app = gr.Interface( | |
| caller, | |
| inputs=["text","text"], | |
| outputs="text", | |
| title="Local Coherence Scorer (CCL)", | |
| ) | |
| if __name__ == "__main__": | |
| gradio_app.launch() |