It's a dict, not an object

This commit is contained in:
niten 2023-06-07 12:32:30 -07:00
parent 25c69b1208
commit 671ed74656
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ def analyze_image(request: Request, image: UploadFile):
str(outgoing_dir / (file_hash.hexdigest() + ".png"))) str(outgoing_dir / (file_hash.hexdigest() + ".png")))
remove(infile) remove(infile)
result = result_to_dict(detect_result, base_url) result = result_to_dict(detect_result, base_url)
if not result.labels: if not result["labels"]:
# There were no objects detected # There were no objects detected
remove(detect_result.outfile) remove(detect_result.outfile)
return result return result