Spaces:
Runtime error
Runtime error
Hector Lopez
commited on
Commit
·
ab5b42b
1
Parent(s):
26675f2
Fix bug
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def plot_img_no_mask(image, boxes):
|
|
22 |
pt1 = (x1, y1)
|
23 |
pt2 = (x2, y2)
|
24 |
cv2.rectangle(image, pt1, pt2, (220,0,0), thickness=5)
|
25 |
-
|
26 |
plt.axis('off')
|
27 |
ax.imshow(image)
|
28 |
fig.savefig("img.png", bbox_inches='tight')
|
@@ -32,7 +32,7 @@ image_file = st.file_uploader("Upload Images", type=["png","jpg","jpeg"])
|
|
32 |
if image_file is not None:
|
33 |
print(image_file)
|
34 |
print('Getting predictions')
|
35 |
-
pred_dict = predict(model, image_file)
|
36 |
print('Fixing the preds')
|
37 |
boxes, image = prepare_prediction(pred_dict)
|
38 |
print('Plotting')
|
|
|
22 |
pt1 = (x1, y1)
|
23 |
pt2 = (x2, y2)
|
24 |
cv2.rectangle(image, pt1, pt2, (220,0,0), thickness=5)
|
25 |
+
|
26 |
plt.axis('off')
|
27 |
ax.imshow(image)
|
28 |
fig.savefig("img.png", bbox_inches='tight')
|
|
|
32 |
if image_file is not None:
|
33 |
print(image_file)
|
34 |
print('Getting predictions')
|
35 |
+
pred_dict = predict(model, image_file.name)
|
36 |
print('Fixing the preds')
|
37 |
boxes, image = prepare_prediction(pred_dict)
|
38 |
print('Plotting')
|