alyxx commited on
Commit ·
7937069
1
Parent(s): 2f09011
update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,10 @@ ner = pipeline("ner",
|
|
| 12 |
|
| 13 |
# function for the gradio app
|
| 14 |
def fn_ner(prompt):
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
# gradio app
|
|
|
|
| 12 |
|
| 13 |
# function for the gradio app
|
| 14 |
def fn_ner(prompt):
|
| 15 |
+
entities = ner(prompt)
|
| 16 |
+
# Extract recognized entities and concatenate them into a single string
|
| 17 |
+
entity_string = ", ".join([entity['entity'] for entity in entities])
|
| 18 |
+
return entity_string
|
| 19 |
|
| 20 |
|
| 21 |
# gradio app
|