Spaces:
Runtime error
Runtime error
Catherine Breslin
commited on
Commit
·
4e0e861
1
Parent(s):
a53dcb2
Printing label explanations
Browse files
app.py
CHANGED
@@ -16,3 +16,9 @@ if text:
|
|
16 |
doc = nlp(text)
|
17 |
visualize_ner(doc, labels=nlp.get_pipe("ner").labels)
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
doc = nlp(text)
|
17 |
visualize_ner(doc, labels=nlp.get_pipe("ner").labels)
|
18 |
|
19 |
+
|
20 |
+
st.header("Label Explanation")
|
21 |
+
for label in nlp.get_pipe("ner").labels:
|
22 |
+
exp = spacy.explain(label)
|
23 |
+
st.markdown ("%s : %s"%(label, exp))
|
24 |
+
|