Omnibus commited on
Commit
3422d8c
β€’
1 Parent(s): 4f1e200

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- prediction = pipeline("image-segmentation", model=f"{model}")
41
- pred = model(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)):
 
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)):