Spaces:
Running
Running
Update Demo.py
Browse files
Demo.py
CHANGED
|
@@ -112,16 +112,17 @@ results = {
|
|
| 112 |
'POS': [p.result for p in output[0]['pos']]
|
| 113 |
}
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
df = pd.DataFrame(results)
|
| 116 |
df.index += 1
|
| 117 |
st.dataframe(df)
|
| 118 |
|
| 119 |
-
from annotated_text import annotated_text
|
| 120 |
-
|
| 121 |
-
# Create annotated text
|
| 122 |
-
annotated_tokens = []
|
| 123 |
-
for token, pos in zip(results['Token'], results['POS']):
|
| 124 |
-
annotated_tokens.append((token, pos.lower()))
|
| 125 |
-
|
| 126 |
-
# Annotate the entire text with annotated tokens
|
| 127 |
-
annotated_text(*annotated_tokens)
|
|
|
|
| 112 |
'POS': [p.result for p in output[0]['pos']]
|
| 113 |
}
|
| 114 |
|
| 115 |
+
# from annotated_text import annotated_text
|
| 116 |
+
|
| 117 |
+
# # Create annotated text
|
| 118 |
+
# annotated_tokens = []
|
| 119 |
+
# for token, pos in zip(results['Token'], results['POS']):
|
| 120 |
+
# annotated_tokens.append((token, pos.lower()))
|
| 121 |
+
|
| 122 |
+
# # Annotate the entire text with annotated tokens
|
| 123 |
+
# annotated_text(*annotated_tokens)
|
| 124 |
+
|
| 125 |
df = pd.DataFrame(results)
|
| 126 |
df.index += 1
|
| 127 |
st.dataframe(df)
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|