Spaces:
Running
Running
File size: 507 Bytes
317026d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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()
|