| import gradio as gr | |
| from transformers import pipeline | |
| gr.Interface.from_pipeline( | |
| pipeline("token-classification", "cogniveon/nlpcw-ner"), | |
| title="Abbreviation Detection", | |
| description="Token classication pipeline that detects abbreviations and it's long forms (based on huggingface model: \"romainlhardy/roberta-large-finetuned-ner\")", | |
| fill_width=True, | |
| allow_flagging='never', | |
| examples=[ | |
| "The new SMPL-X model (Skinned Multi Person Linear Model - eXpressive) is based on SMPL and retains the benefits of that model: compatibility with graphics software, simple parametrization, small size, efficient, differentiable, etc." | |
| ], | |
| ).launch() |