hassoudi commited on
Commit
ef88834
·
verified ·
1 Parent(s): 41b77f5

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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"]] # this fixes the issue
 
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
  ]