Spaces:
Runtime error
Runtime error
Commit
·
2db475a
1
Parent(s):
6ce21cb
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
from transformers import SegformerFeatureExtractor, SegformerForSemanticSegmentation
|
2 |
-
|
3 |
from transformers import pipeline
|
4 |
from PIL import Image, ImageDraw, ImageFont
|
5 |
import gradio as gr
|
6 |
|
7 |
-
|
8 |
|
9 |
def object_classify(img1,img2):
|
10 |
|
@@ -30,6 +30,7 @@ def object_classify(img1,img2):
|
|
30 |
|
31 |
#gets the uncommon elements from the 2 lists
|
32 |
missing_objects= list(set(objects_1)-set(objects_2))
|
|
|
33 |
return missing_objects
|
34 |
|
35 |
|
|
|
1 |
from transformers import SegformerFeatureExtractor, SegformerForSemanticSegmentation
|
2 |
+
from datasets import load_dataset
|
3 |
from transformers import pipeline
|
4 |
from PIL import Image, ImageDraw, ImageFont
|
5 |
import gradio as gr
|
6 |
|
7 |
+
ds = load_dataset("hf-internal-testing/fixtures_ade20k", split="test")
|
8 |
|
9 |
def object_classify(img1,img2):
|
10 |
|
|
|
30 |
|
31 |
#gets the uncommon elements from the 2 lists
|
32 |
missing_objects= list(set(objects_1)-set(objects_2))
|
33 |
+
missing_objects=*missing_objects, sep = ", "
|
34 |
return missing_objects
|
35 |
|
36 |
|