Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -216,13 +216,14 @@ def output(predict_class, caption):
|
|
| 216 |
conj = ['are', 'is', 'dog']
|
| 217 |
if predict_class == '不是校狗' or caption.find('dog') == -1:
|
| 218 |
print(f'{caption} ({predict_class})')
|
| 219 |
-
return
|
| 220 |
else:
|
| 221 |
for c in conj:
|
| 222 |
if caption.find(c) != -1:
|
| 223 |
print(f'{predict_class} is{caption[caption.find(c) + len(c):]}')
|
| 224 |
return
|
| 225 |
print(f'{caption} ({predict_class})')
|
|
|
|
| 226 |
|
| 227 |
|
| 228 |
|
|
|
|
| 216 |
conj = ['are', 'is', 'dog']
|
| 217 |
if predict_class == '不是校狗' or caption.find('dog') == -1:
|
| 218 |
print(f'{caption} ({predict_class})')
|
| 219 |
+
return f'{caption} ({predict_class})'
|
| 220 |
else:
|
| 221 |
for c in conj:
|
| 222 |
if caption.find(c) != -1:
|
| 223 |
print(f'{predict_class} is{caption[caption.find(c) + len(c):]}')
|
| 224 |
return
|
| 225 |
print(f'{caption} ({predict_class})')
|
| 226 |
+
return f'{caption} ({predict_class})'
|
| 227 |
|
| 228 |
|
| 229 |
|