Spaces:
Runtime error
Runtime error
Commit ·
2ef6246
1
Parent(s): cdedcd3
ner_app
Browse files
app.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import steamlit as st
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
ner = pipeline("ner", grouped_entities=True)
|
| 5 |
+
text = st.text_area('enter some text to extract entities')
|
| 6 |
+
|
| 7 |
+
if text:
|
| 8 |
+
output = ner(text)
|
| 9 |
+
st.json(output)
|