Spaces:
Runtime error
Runtime error
spitzc32
commited on
Commit
·
a6944e3
1
Parent(s):
88c6b2c
made result interactive
Browse files
app.py
CHANGED
|
@@ -38,10 +38,10 @@ def model(word: str):
|
|
| 38 |
labels.append(entity.text)
|
| 39 |
tags.append(entity.get_label("ner").value)
|
| 40 |
|
| 41 |
-
return {
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
}
|
| 45 |
|
| 46 |
def get_tag_results(_):
|
| 47 |
return pn.Column(
|
|
@@ -59,7 +59,7 @@ template = pn.template.FastListTemplate(
|
|
| 59 |
button,
|
| 60 |
text_widget
|
| 61 |
],
|
| 62 |
-
main=[
|
| 63 |
accent_base_color="#88d8b0",
|
| 64 |
header_background="#88d8b0",
|
| 65 |
)
|
|
|
|
| 38 |
labels.append(entity.text)
|
| 39 |
tags.append(entity.get_label("ner").value)
|
| 40 |
|
| 41 |
+
return pn.pane.Markdown(f"""{
|
| 42 |
+
'labels': {labels},
|
| 43 |
+
'tags': {tags}
|
| 44 |
+
}""")
|
| 45 |
|
| 46 |
def get_tag_results(_):
|
| 47 |
return pn.Column(
|
|
|
|
| 59 |
button,
|
| 60 |
text_widget
|
| 61 |
],
|
| 62 |
+
main=[interactive],
|
| 63 |
accent_base_color="#88d8b0",
|
| 64 |
header_background="#88d8b0",
|
| 65 |
)
|