It's a dict, not an object
This commit is contained in:
parent
25c69b1208
commit
671ed74656
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue