Spaces:
Running
Running
import gradio as gr | |
from transformers import pipeline | |
token_classifier = pipeline(model="jjzha/jobbert_skill_extraction", aggregation_strategy="simple") | |
examples = [ | |
"Knowing Python is a plus.", | |
] | |
def ner(text): | |
output = token_classifier(text) | |
return {"text": text, "entities": output} | |
demo = gr.Interface(ner, | |
gr.Textbox(placeholder="Enter sentence here..."), | |
gr.HighlightedText(), | |
examples=examples) | |
demo.launch() | |