Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,11 +40,15 @@ if choice == 'Text Input':
|
|
| 40 |
sentence = Sentence(data)
|
| 41 |
model = load_model('best-model-002.pt')
|
| 42 |
model.predict(sentence)
|
|
|
|
| 43 |
# st.write(sentence.to_original_text())
|
| 44 |
# st.write(sentence.to_tagged_string())
|
| 45 |
for token in sentence:
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
|
|
|
|
| 40 |
sentence = Sentence(data)
|
| 41 |
model = load_model('best-model-002.pt')
|
| 42 |
model.predict(sentence)
|
| 43 |
+
my_list = []
|
| 44 |
# st.write(sentence.to_original_text())
|
| 45 |
# st.write(sentence.to_tagged_string())
|
| 46 |
for token in sentence:
|
| 47 |
+
word = []
|
| 48 |
+
word.append(token.text)
|
| 49 |
+
word.append(token.tag)
|
| 50 |
+
my_list.append(tuple(word))
|
| 51 |
+
annotated_text(my_list)
|
| 52 |
|
| 53 |
|
| 54 |
|