Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -25,17 +25,20 @@ def main():
|
|
25 |
clicked = st.form_submit_button("Predict quality")
|
26 |
|
27 |
if clicked:
|
28 |
-
result=model.predict(pd.DataFrame({
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
predicted_quality_rank = result[0]
|
40 |
st.success('The predicted wine quality ranking is {}'.format(predicted_quality_rank))
|
41 |
|
|
|
25 |
clicked = st.form_submit_button("Predict quality")
|
26 |
|
27 |
if clicked:
|
28 |
+
result = model.predict(pd.DataFrame({
|
29 |
+
"fixed acidity": [fixed_acidity],
|
30 |
+
"volatile acidity": [volatile_acidity],
|
31 |
+
"citric acid": [citric_acid],
|
32 |
+
"residual sugar": [residual_sugar],
|
33 |
+
"chlorides": [chlorides],
|
34 |
+
"free sulfur dioxide": [free_sulfur_dioxide],
|
35 |
+
"total sulfur dioxide": [total_sulfur_dioxide],
|
36 |
+
"density": [density],
|
37 |
+
"pH": [ph],
|
38 |
+
"sulphates": [sulphates],
|
39 |
+
"alcohol": [alcohol]
|
40 |
+
}))
|
41 |
+
|
42 |
predicted_quality_rank = result[0]
|
43 |
st.success('The predicted wine quality ranking is {}'.format(predicted_quality_rank))
|
44 |
|