Update app.py
Browse files
app.py
CHANGED
@@ -23,14 +23,15 @@ def main():
|
|
23 |
|
24 |
clicked = st.form_submit_button("Predict Color")
|
25 |
if clicked:
|
26 |
-
result=model.predict(pd.DataFrame({"Room": [
|
27 |
-
"Partitions": [
|
28 |
-
"Rows": [
|
29 |
-
"Columns": [
|
30 |
-
"Color": [
|
31 |
predicted_color = predict_color(result)
|
32 |
#result = 'Red' = Red if result[0] == 1 else 'Blue'
|
33 |
-
st.success('The predicted color is {}'.format(
|
|
|
34 |
def predict_color(prediction):
|
35 |
if prediction == 'Red':
|
36 |
return 'Red'
|
|
|
23 |
|
24 |
clicked = st.form_submit_button("Predict Color")
|
25 |
if clicked:
|
26 |
+
result=model.predict(pd.DataFrame({"Room": [room],
|
27 |
+
"Partitions": [partition],
|
28 |
+
"Rows": [rows],
|
29 |
+
"Columns": [columns],
|
30 |
+
"Color": [color]}))
|
31 |
predicted_color = predict_color(result)
|
32 |
#result = 'Red' = Red if result[0] == 1 else 'Blue'
|
33 |
+
st.success('The predicted color is {}'.format(predicted_color))
|
34 |
+
|
35 |
def predict_color(prediction):
|
36 |
if prediction == 'Red':
|
37 |
return 'Red'
|