Skip to content

Commit 3ef9ae2

Browse files
committed
clean up the outputs and codes
1 parent 3d66235 commit 3ef9ae2

10 files changed

+4
-5
lines changed

app_pages/page_machine_learning_performance.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def page_machine_learning_performance_metrics():
1919

2020
version = 'v1'
2121
version_2 = 'v2'
22-
version_3 = 'v3'
2322

2423
st.write("### Train, Validation and Test Set: Labels Frequencies")
2524

@@ -82,7 +81,7 @@ def page_machine_learning_performance_metrics():
8281
st.write("### Confusion Matrix")
8382
col1 = st.beta_columns(1)[0]
8483
with col1:
85-
model_acc = plt.imread(f"jupyter_notebooks/outputs/{version_3}/confusion_matrix.png")
84+
model_acc = plt.imread(f"jupyter_notebooks/outputs/{version_2}/confusion_matrix.png")
8685
st.image(model_acc, caption='Confusion Matrix')
8786

8887
st.markdown(
@@ -96,7 +95,7 @@ def page_machine_learning_performance_metrics():
9695
st.write("---")
9796

9897
# Load confusion matrix from joblib
99-
confusion_matrix = joblib.load(f"jupyter_notebooks/outputs/{version_3}/confusion_matrix.joblib")
98+
confusion_matrix = joblib.load(f"jupyter_notebooks/outputs/{version_2}/confusion_matrix.joblib")
10099

101100
# Convert confusion matrix to a pandas DataFrame
102101
confusion_matrix_df = pd.DataFrame(confusion_matrix, columns=['Predicted Healthy', 'Predicted Powdery', 'Predicted Rust'], index=['Actual Healthy', 'Actual Powdery', 'Actual Rust'])
@@ -108,7 +107,7 @@ def page_machine_learning_performance_metrics():
108107
st.write("---")
109108

110109
# Load metrics from joblib
111-
metrics = joblib.load(f"jupyter_notebooks/outputs/{version_3}/metrics.joblib")
110+
metrics = joblib.load(f"jupyter_notebooks/outputs/{version_2}/metrics.joblib")
112111

113112
# Convert metrics to a pandas DataFrame
114113
metrics_df = pd.DataFrame(metrics, index=['Value'])

app_pages/page_plant_disease_detector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def page_plant_disease_detector_body():
102102
st.image(img_pil, caption=f"Image Size: {img_pil.size[0]}px width x {img_pil.size[1]}px height", output_format='PNG')
103103
st.markdown('<style>img {margin-bottom: 20px;}</style>', unsafe_allow_html=True)
104104

105-
version = 'v3'
105+
version = 'v2'
106106
resized_img = resize_input_image(img=img_pil, version=version)
107107
pred_proba, pred_class = load_model_and_predict(resized_img, version=version)
108108

-9.05 KB
Loading
Binary file not shown.
Binary file not shown.
-21.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)