Update app.py
Browse files
app.py
CHANGED
|
@@ -205,7 +205,8 @@ def image_classifier(inp):
|
|
| 205 |
# If input not valid, return dummy data or raise error
|
| 206 |
if inp is None:
|
| 207 |
if inp is None:
|
| 208 |
-
return {'
|
|
|
|
| 209 |
# preprocess
|
| 210 |
image = preprocess_image(inp)
|
| 211 |
image = image.to(dtype=torch.float32)
|
|
|
|
| 205 |
# If input not valid, return dummy data or raise error
|
| 206 |
if inp is None:
|
| 207 |
if inp is None:
|
| 208 |
+
return {'cat': 0.3, 'dog': 0.7}
|
| 209 |
+
#return {'Actinic Keratosis': 0.0, 'Basal Cell Carcinoma': 0.0, 'Benign Keratosis': 0.0, 'Dermatofibroma': 0.0, 'Melanoma': 0.0, 'Melanocytic Nevi': 0.0, 'Vascular Lesion': 0.0}
|
| 210 |
# preprocess
|
| 211 |
image = preprocess_image(inp)
|
| 212 |
image = image.to(dtype=torch.float32)
|