Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def analyze_ner(text):
|
|
| 37 |
results = []
|
| 38 |
for pred in predictions:
|
| 39 |
word = pred['word']
|
| 40 |
-
tag = label_mapping[pred['
|
| 41 |
confidence = pred['score']
|
| 42 |
results.append(f"Word: {word}\nPredicted Tag: {tag}\nConfidence Probability: {confidence:.2f}\n")
|
| 43 |
|
|
|
|
| 37 |
results = []
|
| 38 |
for pred in predictions:
|
| 39 |
word = pred['word']
|
| 40 |
+
tag = label_mapping[pred['entity_group']]
|
| 41 |
confidence = pred['score']
|
| 42 |
results.append(f"Word: {word}\nPredicted Tag: {tag}\nConfidence Probability: {confidence:.2f}\n")
|
| 43 |
|