Spaces:
Runtime error
Runtime error
Update pages/ResNet50_Model.py
Browse files- pages/ResNet50_Model.py +4 -4
pages/ResNet50_Model.py
CHANGED
|
@@ -18,7 +18,7 @@ with st.spinner('Model is being loaded..'):
|
|
| 18 |
model = load_model()
|
| 19 |
|
| 20 |
st.write("""
|
| 21 |
-
#
|
| 22 |
"""
|
| 23 |
)
|
| 24 |
|
|
@@ -48,7 +48,7 @@ else:
|
|
| 48 |
|
| 49 |
prediction = upload_predict(image, model)
|
| 50 |
predicted_result = np.argmax(prediction)
|
| 51 |
-
print(predicted_result)
|
| 52 |
|
| 53 |
classfiers = ['bacterial_leaf_blight','bacterial_leaf_streak','bakanae','brown_spot','grassy_stunt_virus','healthy_rice_plant',
|
| 54 |
'narrow_brown_spot','ragged_stunt_virus','rice_blast','rice_false_smut','sheath_blight','sheath_rot','stem_rot','tungro_virus']
|
|
@@ -57,5 +57,5 @@ else:
|
|
| 57 |
|
| 58 |
# Results
|
| 59 |
st.success("Your plant is suffering from: ", image_class)
|
| 60 |
-
st.info("
|
| 61 |
-
print("The image is classified as ", image_class, "with a similarity score of", confidence_score)
|
|
|
|
| 18 |
model = load_model()
|
| 19 |
|
| 20 |
st.write("""
|
| 21 |
+
# ResNet50 Model
|
| 22 |
"""
|
| 23 |
)
|
| 24 |
|
|
|
|
| 48 |
|
| 49 |
prediction = upload_predict(image, model)
|
| 50 |
predicted_result = np.argmax(prediction)
|
| 51 |
+
#print(predicted_result)
|
| 52 |
|
| 53 |
classfiers = ['bacterial_leaf_blight','bacterial_leaf_streak','bakanae','brown_spot','grassy_stunt_virus','healthy_rice_plant',
|
| 54 |
'narrow_brown_spot','ragged_stunt_virus','rice_blast','rice_false_smut','sheath_blight','sheath_rot','stem_rot','tungro_virus']
|
|
|
|
| 57 |
|
| 58 |
# Results
|
| 59 |
st.success("Your plant is suffering from: ", image_class)
|
| 60 |
+
st.info("👀 Accuracy Confidence score is: ", confidence_score, "/100")
|
| 61 |
+
#print("The image is classified as ", image_class, "with a similarity score of", confidence_score)
|