Spaces:
Sleeping
Sleeping
Update Fault_Classification.py
Browse files- Fault_Classification.py +6 -0
Fault_Classification.py
CHANGED
|
@@ -68,6 +68,12 @@ if datasets:
|
|
| 68 |
test_loss, test_accuracy = model.evaluate(X_test_scaled, y_test)
|
| 69 |
st.write(f"### Test Accuracy: {test_accuracy * 100:.2f}%")
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
# Prediction Section
|
| 72 |
st.header("Make Predictions")
|
| 73 |
feature_names = X.columns.tolist() if datasets else []
|
|
|
|
| 68 |
test_loss, test_accuracy = model.evaluate(X_test_scaled, y_test)
|
| 69 |
st.write(f"### Test Accuracy: {test_accuracy * 100:.2f}%")
|
| 70 |
|
| 71 |
+
# Display total number of labels and distribution as a table
|
| 72 |
+
label_counts = combined_data[target_column].value_counts().rename_axis('Label').reset_index(name='Counts')
|
| 73 |
+
st.metric(label="Total Faults", value=label_counts['Counts'].sum())
|
| 74 |
+
st.write("### Fault Distribution")
|
| 75 |
+
st.table(label_counts)
|
| 76 |
+
|
| 77 |
# Prediction Section
|
| 78 |
st.header("Make Predictions")
|
| 79 |
feature_names = X.columns.tolist() if datasets else []
|