Spaces:
Runtime error
Runtime error
Commit
·
a25ca20
1
Parent(s):
dc12171
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,8 @@ labels = ['Acne and Rosacea Photos',
|
|
19 |
'Tinea Ringworm Candidiasis and other Fungal Infections',
|
20 |
'Urticaria Hives', 'Vascular Tumors', 'Vasculitis Photos', 'Warts Molluscum and other Viral Infections']
|
21 |
|
22 |
-
def classify_image(
|
23 |
-
|
24 |
prediction = model.predict(inp).flatten()
|
25 |
confidences = {labels[i]: float(prediction[i]) for i in range(23)}
|
26 |
return confidences
|
|
|
19 |
'Tinea Ringworm Candidiasis and other Fungal Infections',
|
20 |
'Urticaria Hives', 'Vascular Tumors', 'Vasculitis Photos', 'Warts Molluscum and other Viral Infections']
|
21 |
|
22 |
+
def classify_image(image):
|
23 |
+
image = image.reshape((-1, 256, 256, 3))
|
24 |
prediction = model.predict(inp).flatten()
|
25 |
confidences = {labels[i]: float(prediction[i]) for i in range(23)}
|
26 |
return confidences
|