Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,8 @@ def image_objects(image):
|
|
37 |
def get_seg(image, model_choice):
|
38 |
image = img_resize(image)
|
39 |
model = models[model_choice]
|
40 |
-
|
41 |
-
pred =
|
42 |
pred_object_list = [str(i)+'_'+x['label'] for i, x in enumerate(pred)]
|
43 |
seg_box=[]
|
44 |
for i in range(len(pred)):
|
|
|
37 |
def get_seg(image, model_choice):
|
38 |
image = img_resize(image)
|
39 |
model = models[model_choice]
|
40 |
+
segment = pipeline("image-segmentation", model=f"{model}")
|
41 |
+
pred = segment(image)
|
42 |
pred_object_list = [str(i)+'_'+x['label'] for i, x in enumerate(pred)]
|
43 |
seg_box=[]
|
44 |
for i in range(len(pred)):
|