Spaces:
Build error
Build error
8uydz commited on
Commit ·
fce279d
1
Parent(s): 0fec52c
modify app
Browse files
app.py
CHANGED
|
@@ -18,10 +18,10 @@ def tensor2labels(img):
|
|
| 18 |
print(category)
|
| 19 |
if 'dog' in category:
|
| 20 |
category.remove('dog')
|
| 21 |
-
return f"This
|
| 22 |
elif 'cat' in category:
|
| 23 |
category.remove('cat')
|
| 24 |
-
return f"This
|
| 25 |
else:
|
| 26 |
raise Exception
|
| 27 |
|
|
|
|
| 18 |
print(category)
|
| 19 |
if 'dog' in category:
|
| 20 |
category.remove('dog')
|
| 21 |
+
return f"This is a Dog and belongs to the breed: {category.pop()}"
|
| 22 |
elif 'cat' in category:
|
| 23 |
category.remove('cat')
|
| 24 |
+
return f"This is a Cat and belongs to the breed: {category.pop()}"
|
| 25 |
else:
|
| 26 |
raise Exception
|
| 27 |
|