commit changes
Browse files
app.py
CHANGED
@@ -33,9 +33,9 @@ def read_image(image_file: bytes = File(...)):
|
|
33 |
|
34 |
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
|
35 |
box = [round(i, 2) for i in box.tolist()]
|
36 |
-
response['scores'] = model.config.id2label[label.item()]
|
37 |
-
response['labels'] = score.item()
|
38 |
-
response['boxes'] = box
|
39 |
print(model.config.id2label[label.item()])
|
40 |
print(score.item())
|
41 |
print(box)
|
|
|
33 |
|
34 |
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
|
35 |
box = [round(i, 2) for i in box.tolist()]
|
36 |
+
# response['scores'] = model.config.id2label[label.item()]
|
37 |
+
# response['labels'] = score.item()
|
38 |
+
# response['boxes'] = box
|
39 |
print(model.config.id2label[label.item()])
|
40 |
print(score.item())
|
41 |
print(box)
|