Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ new_img = st.file_uploader('Please upload your retinal image in .png or .jpeg/.j
|
|
20 |
|
21 |
def predict_upload():
|
22 |
result = predict(new_img) # result is a probabilities array
|
23 |
-
classes = ['cataract', '
|
24 |
max_result = (np.max(result, axis=-1)) * 100 # max probability
|
25 |
pred_prob = np.format_float_positional(max_result, precision=2) # format probability
|
26 |
pred_class = classes[(np.argmax(result, axis=-1)[0])] # string
|
|
|
20 |
|
21 |
def predict_upload():
|
22 |
result = predict(new_img) # result is a probabilities array
|
23 |
+
classes = ['cataract', 'diabetic retinopathy', 'glaucoma', 'normal']
|
24 |
max_result = (np.max(result, axis=-1)) * 100 # max probability
|
25 |
pred_prob = np.format_float_positional(max_result, precision=2) # format probability
|
26 |
pred_class = classes[(np.argmax(result, axis=-1)[0])] # string
|