File size: 348 Bytes
edbc37a
0ec181f
edbc37a
 
0ec181f
edbc37a
0ec181f
edbc37a
 
 
 
 
 
0ec181f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from typing import Any, Dict
import gradio as gr
from pipeline import LongCorefPipeline
from huggingface_hub import snapshot_download

long_coref = LongCorefPipeline(snapshot_download("kwang2049/long-coref"))


def fn(doc: str) -> Dict[str, Any]:
    return long_coref(doc)


demo = gr.Interface(fn=fn, inputs="text", outputs="text")
demo.launch()