Commit
·
e03f649
1
Parent(s):
7541c42
Update app.py
Browse files
app.py
CHANGED
@@ -108,14 +108,6 @@ def get_user_input():
|
|
108 |
|
109 |
user_input, submit_button = get_user_input()
|
110 |
|
111 |
-
quality_mapping = {
|
112 |
-
3: "Worst quality (3)",
|
113 |
-
4: "Low quality (4)",
|
114 |
-
5: "Medium-to-low quality (5)",
|
115 |
-
6: "Medium-to-high quality (6)",
|
116 |
-
7: "Good quality (7)",
|
117 |
-
8: "Best quality (8)"
|
118 |
-
}
|
119 |
|
120 |
# When the 'Submit' button is pressed, perform the prediction
|
121 |
if submit_button:
|
@@ -123,14 +115,13 @@ if submit_button:
|
|
123 |
prediction = pipe.predict(user_input)
|
124 |
prediction_value = prediction[0]
|
125 |
|
126 |
-
prediction_text = quality_mapping[prediction_value]
|
127 |
-
|
128 |
# Display the prediction
|
129 |
st.header("Predicted Quality")
|
130 |
-
st.write(
|
|
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
)
|
|
|
108 |
|
109 |
user_input, submit_button = get_user_input()
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
# When the 'Submit' button is pressed, perform the prediction
|
113 |
if submit_button:
|
|
|
115 |
prediction = pipe.predict(user_input)
|
116 |
prediction_value = prediction[0]
|
117 |
|
|
|
|
|
118 |
# Display the prediction
|
119 |
st.header("Predicted Quality")
|
120 |
+
st.write(prediction_value)
|
121 |
+
|
122 |
|
123 |
+
st.markdown(
|
124 |
+
"""
|
125 |
+
[See how this model was created on Kaggle: 🍷 Wine Quality - EDA, Prediction and Deploy](https://www.kaggle.com/code/lusfernandotorres/wine-quality-eda-prediction-and-deploy/notebook)
|
126 |
+
"""
|
127 |
)
|