Update app.py
Browse files
app.py
CHANGED
|
@@ -57,13 +57,13 @@ def predict(img) -> Tuple[Dict,float,float] :
|
|
| 57 |
pred_class = class_names[pred_img.argmax()]
|
| 58 |
print(f"Predicted macular diseases is: {pred_class} with probability: {pred_img.max():.2f}")
|
| 59 |
|
| 60 |
-
|
| 61 |
|
| 62 |
|
| 63 |
end_time = timer()
|
| 64 |
pred_time = round(end_time - start_time , 4)
|
| 65 |
|
| 66 |
-
return pred_class ,
|
| 67 |
|
| 68 |
### 4. Gradio app - our Gradio interface + launch command
|
| 69 |
|
|
|
|
| 57 |
pred_class = class_names[pred_img.argmax()]
|
| 58 |
print(f"Predicted macular diseases is: {pred_class} with probability: {pred_img.max():.2f}")
|
| 59 |
|
| 60 |
+
pred_probbb = pred_img.max() * 100
|
| 61 |
|
| 62 |
|
| 63 |
end_time = timer()
|
| 64 |
pred_time = round(end_time - start_time , 4)
|
| 65 |
|
| 66 |
+
return pred_class , pred_probbb , pred_time
|
| 67 |
|
| 68 |
### 4. Gradio app - our Gradio interface + launch command
|
| 69 |
|