Skip to content

Commit

Permalink
fix(rapidocr_api): float type error, cause scores not to be displayed (
Browse files Browse the repository at this point in the history
…#253)

Co-authored-by: Whm <Coke@LOL>
  • Loading branch information
whmlol and Whm authored Nov 12, 2024
1 parent 4d3ac3b commit 0de2066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/rapidocr_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __call__(
if isinstance(dat, str):
values["rec_txt"] = dat

if isinstance(dat, np.float64):
if isinstance(dat, np.float32):
values["score"] = f"{dat:.4f}"

if isinstance(dat, list):
Expand Down

0 comments on commit 0de2066

Please sign in to comment.