Spaces:
Runtime error
Runtime error
Updated UI
Browse filesChanged Predicted class and Confidence to display as df
app.py
CHANGED
|
@@ -93,10 +93,14 @@ def main():
|
|
| 93 |
with col2:
|
| 94 |
st.image(explanation_image, caption="Explanation Image", use_column_width=True)
|
| 95 |
|
| 96 |
-
|
| 97 |
st.subheader("Prediction")
|
| 98 |
-
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
if __name__ == "__main__":
|
| 102 |
main()
|
|
|
|
| 93 |
with col2:
|
| 94 |
st.image(explanation_image, caption="Explanation Image", use_column_width=True)
|
| 95 |
|
| 96 |
+
# Display prediction
|
| 97 |
st.subheader("Prediction")
|
| 98 |
+
# Create a table for prediction results
|
| 99 |
+
prediction_table = pd.DataFrame({
|
| 100 |
+
"Predicted Class": [predicted_class],
|
| 101 |
+
"Confidence": [f"{confidence_score}%"]
|
| 102 |
+
})
|
| 103 |
+
st.table(prediction_table)
|
| 104 |
|
| 105 |
if __name__ == "__main__":
|
| 106 |
main()
|