Spaces:
Runtime error
Runtime error
Commit
•
97de071
1
Parent(s):
52bf25d
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def object_classify(img1,img2):
|
|
29 |
objects_2.append(j['label'])
|
30 |
|
31 |
#gets the uncommon elements from the 2 lists
|
32 |
-
missing_objects=list(set(objects_1)-set(objects_2))
|
33 |
|
34 |
return missing_objects
|
35 |
|
@@ -38,8 +38,8 @@ TITLE = 'Missing Items'
|
|
38 |
DESCRIPTION = 'Input two indoor pictures. First image being the original and second is one with the missing item/s'
|
39 |
EXAMPLES = [['Bedroom_1.jpg'],['Bedroom_2.jpg']]
|
40 |
|
41 |
-
INPUTS=[gr.inputs.Image(type = 'pil'),gr.inputs.Image(type = '
|
42 |
-
OUTPUTS=gr.outputs.Textbox()
|
43 |
|
44 |
interface=gr.Interface(object_classify,
|
45 |
INPUTS,
|
|
|
29 |
objects_2.append(j['label'])
|
30 |
|
31 |
#gets the uncommon elements from the 2 lists
|
32 |
+
missing_objects= str(list(set(objects_1)-set(objects_2)))[1:-1]
|
33 |
|
34 |
return missing_objects
|
35 |
|
|
|
38 |
DESCRIPTION = 'Input two indoor pictures. First image being the original and second is one with the missing item/s'
|
39 |
EXAMPLES = [['Bedroom_1.jpg'],['Bedroom_2.jpg']]
|
40 |
|
41 |
+
INPUTS=[gr.inputs.Image(type = 'pil', label='Original Image'),gr.inputs.Image(type = 'Image 2')]
|
42 |
+
OUTPUTS=gr.outputs.Textbox("Missing Item/s is/are: ")
|
43 |
|
44 |
interface=gr.Interface(object_classify,
|
45 |
INPUTS,
|