Spaces:
Sleeping
Sleeping
Commit ·
799e434
1
Parent(s): e63e5de
Update model.py
Browse files
model.py
CHANGED
|
@@ -77,7 +77,7 @@ class Model(LabelStudioMLBase):
|
|
| 77 |
|
| 78 |
if self.id2label[label.item()] == 'Propuesta':
|
| 79 |
pred_label_id = str(uuid4())
|
| 80 |
-
image = image.crop((x, y, x2, y2))
|
| 81 |
input = self.seg_image_processor(images=image, return_tensors="pt")
|
| 82 |
logits = self.seg_model(**inputs).logits
|
| 83 |
logits = torch.exp(logits)
|
|
|
|
| 77 |
|
| 78 |
if self.id2label[label.item()] == 'Propuesta':
|
| 79 |
pred_label_id = str(uuid4())
|
| 80 |
+
image = image.crop((x.item(), y.item(), x2.item(), y2.item()))
|
| 81 |
input = self.seg_image_processor(images=image, return_tensors="pt")
|
| 82 |
logits = self.seg_model(**inputs).logits
|
| 83 |
logits = torch.exp(logits)
|