update
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def predict(text):
|
|
| 34 |
"text": text,
|
| 35 |
"ents": [{
|
| 36 |
"start": retain_char_position(entity['position'][0]),
|
| 37 |
-
"end": retain_char_position(entity['position'][-1]) +
|
| 38 |
"label": entity['type']
|
| 39 |
} for entity in output['entity_prediction'][0]],
|
| 40 |
"title": None
|
|
|
|
| 34 |
"text": text,
|
| 35 |
"ents": [{
|
| 36 |
"start": retain_char_position(entity['position'][0]),
|
| 37 |
+
"end": retain_char_position(entity['position'][-1]) + len(entity['entity'][-1]),
|
| 38 |
"label": entity['type']
|
| 39 |
} for entity in output['entity_prediction'][0]],
|
| 40 |
"title": None
|