Spaces:
Sleeping
Sleeping
Commit
·
b10f252
1
Parent(s):
c96a420
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ def predict(photo,Label1,Label2,Label3):
|
|
5 |
out1= pipe(images=photo,candidate_labels=[Label1,Label2,Label3])
|
6 |
out2=out1[0]
|
7 |
out3=out2['label']
|
|
|
|
|
|
|
8 |
return out3
|
9 |
label1='Apple'
|
10 |
label2='Orange'
|
|
|
5 |
out1= pipe(images=photo,candidate_labels=[Label1,Label2,Label3])
|
6 |
out2=out1[0]
|
7 |
out3=out2['label']
|
8 |
+
out4=out2['score']
|
9 |
+
if out4<0.9:
|
10 |
+
out3='No Match'
|
11 |
return out3
|
12 |
label1='Apple'
|
13 |
label2='Orange'
|