Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def visualize_segmentation(image, prompts, preds):
|
|
23 |
|
24 |
def segment(img, clases):
|
25 |
print(img)
|
26 |
-
image =
|
27 |
prompts = clases.split(',')
|
28 |
|
29 |
inputs = processor(text=prompts, images=[image] * len(prompts), padding="max_length", return_tensors="pt")
|
|
|
23 |
|
24 |
def segment(img, clases):
|
25 |
print(img)
|
26 |
+
image = Image.fromarray(img, 'RGB')
|
27 |
prompts = clases.split(',')
|
28 |
|
29 |
inputs = processor(text=prompts, images=[image] * len(prompts), padding="max_length", return_tensors="pt")
|