test
Browse files
app.py
CHANGED
|
@@ -3,5 +3,15 @@ import gradio as gr
|
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
iface.launch()
|
|
|
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
+
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
+
#iface.launch()
|
| 8 |
+
|
| 9 |
+
iface = gr.Interface(fn=greet,
|
| 10 |
+
inputs=[gr.Textbox(label="Text to find entities", lines=2)],
|
| 11 |
+
outputs=[gr.HighlightedText(label="Text with entities")],
|
| 12 |
+
title="NER with dslim/bert-base-NER",
|
| 13 |
+
description="Find entities using the `dslim/bert-base-NER` model under the hood!",
|
| 14 |
+
allow_flagging="never",
|
| 15 |
+
#Here we introduce a new tag, examples, easy to use examples for your application
|
| 16 |
+
examples=["My name is Andrew and I live in California", "My name is Poli and work at HuggingFace"])
|
| 17 |
iface.launch()
|