File size: 620 Bytes
c44137f
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
from ner import ner

demo = gr.Interface(fn=ner,
                    inputs=[gr.Textbox(label="Input text", lines=3)],
                    outputs=[gr.HighlightedText(label='Entities')],
                    title='Named Entity Recognition with `dslim/bert-base-ner` ',
                    description='Find entities using the dslim/bert-base-ner model under the hood',
                    allow_flagging='never',
                    examples=["My name is Logeswaran, the creator of this HuggingFace Space. I live in India.","Hello There! I am Andrew Ng, founder of DeepLearning.AI"]
)


demo.launch()