Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,9 +125,8 @@ def ner(text):
|
|
| 125 |
slot_tokens = []
|
| 126 |
|
| 127 |
words[0].capitalize()
|
| 128 |
-
for
|
| 129 |
word = word.replace("_", " ")
|
| 130 |
-
|
| 131 |
if pred == 'O':
|
| 132 |
slot_tokens.extend([(word, None), (" ", None)])
|
| 133 |
elif pred[0] == 'I':
|
|
|
|
| 125 |
slot_tokens = []
|
| 126 |
|
| 127 |
words[0].capitalize()
|
| 128 |
+
for word, pred in zip(words, slot_preds):
|
| 129 |
word = word.replace("_", " ")
|
|
|
|
| 130 |
if pred == 'O':
|
| 131 |
slot_tokens.extend([(word, None), (" ", None)])
|
| 132 |
elif pred[0] == 'I':
|