Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,8 @@ def ner_predict(body: TextRequest, request: Request, api_key: str = Depends(veri
|
|
82 |
{
|
83 |
**ent,
|
84 |
"score": float(ent["score"]),
|
85 |
-
"word": body.text[ent["start"]:ent["end"]] #
|
|
|
86 |
}
|
87 |
for ent in raw_predictions
|
88 |
]
|
|
|
82 |
{
|
83 |
**ent,
|
84 |
"score": float(ent["score"]),
|
85 |
+
"word": body.text[ent["start"]:ent["end"]].strip() # ✅ Clean spaces
|
86 |
+
|
87 |
}
|
88 |
for ent in raw_predictions
|
89 |
]
|