Print what we're returning
This commit is contained in:
parent
928ce39d68
commit
77813871a2
|
@ -76,8 +76,8 @@ def detection_to_dict(d):
|
|||
"label": d.label,
|
||||
"confidence": d.confidence,
|
||||
"box": {
|
||||
"pos_x": d.box[0],
|
||||
"pos_y": d.box[1],
|
||||
"x": d.box[0],
|
||||
"y": d.box[1],
|
||||
"width": d.box[2],
|
||||
"height": d.box[3],
|
||||
},
|
||||
|
@ -128,7 +128,9 @@ def analyze_image(request: Request, image: UploadFile):
|
|||
result = detector.detect_objects(infile, file_hash.hexdigest() + ".png")
|
||||
print("image analyzed")
|
||||
remove(infile)
|
||||
return result_to_dict(result, base_url)
|
||||
ret = result_to_dict(result, base_url)
|
||||
print(ret)
|
||||
return ret
|
||||
|
||||
@app.get("/analyzed_images/${image_name}", response_class=FileResponse)
|
||||
def get_analyzed_image(image_name):
|
||||
|
|
Loading…
Reference in New Issue