Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,6 +57,8 @@ def segment_everything(
|
|
57 |
use_retina=use_retina,
|
58 |
withContours=withContours,)
|
59 |
|
|
|
|
|
60 |
bboxes = results[0].boxes.data
|
61 |
areas = (bboxes[:, 2] - bboxes[:, 0]) * (bboxes[:, 3] - bboxes[:, 1])
|
62 |
_, largest_indices = torch.topk(areas, 2)
|
@@ -80,8 +82,7 @@ def segment_everything(
|
|
80 |
buf.seek(0)
|
81 |
|
82 |
cropped_image = Image.open(buf)
|
83 |
-
print(cropped_image)
|
84 |
-
print('Done till here')
|
85 |
|
86 |
return fig,cropped_image
|
87 |
|
|
|
57 |
use_retina=use_retina,
|
58 |
withContours=withContours,)
|
59 |
|
60 |
+
print('Figure',fig)
|
61 |
+
|
62 |
bboxes = results[0].boxes.data
|
63 |
areas = (bboxes[:, 2] - bboxes[:, 0]) * (bboxes[:, 3] - bboxes[:, 1])
|
64 |
_, largest_indices = torch.topk(areas, 2)
|
|
|
82 |
buf.seek(0)
|
83 |
|
84 |
cropped_image = Image.open(buf)
|
85 |
+
print('Crop type',cropped_image)
|
|
|
86 |
|
87 |
return fig,cropped_image
|
88 |
|