fix: include score in entity response (was missing from highlighted list)
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ def detect_pii(text: str):
|
|
| 36 |
})
|
| 37 |
|
| 38 |
highlighted = [
|
| 39 |
-
{"entity": e["entity"], "start": e["start"], "end": e["end"]}
|
| 40 |
for e in entities
|
| 41 |
]
|
| 42 |
return {"text": text, "entities": highlighted}
|
|
|
|
| 36 |
})
|
| 37 |
|
| 38 |
highlighted = [
|
| 39 |
+
{"entity": e["entity"], "start": e["start"], "end": e["end"], "score": e["score"]}
|
| 40 |
for e in entities
|
| 41 |
]
|
| 42 |
return {"text": text, "entities": highlighted}
|