Tapanat commited on
Commit
b98cdf0
1 Parent(s): c743eca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -11,21 +11,21 @@ def main():
11
  st.title("Colors Prediction")
12
 
13
  with st.form("questionaire"):
14
- color = st.selectbox("Color", unique_Color)
15
 
16
  clicked = st.form_submit_button("Predict Color")
17
  if clicked:
18
- result=model.predict(pd.DataFrame({"Color":[color]}))
19
  #result=model.predict(pd.DataFrame({"Room": [room],
20
  # "Partitions": [partition],
21
  # "Rows": [rows],
22
  # "Columns": [columns],
23
  # "Color": [color]}))
24
- predicted_color = predict_color(result)
25
  #result = 'Red' = Red if result[0] == 1 else 'Blue'
26
  st.success('The predicted color is {}'.format(predicted_color))
27
 
28
- def predict_color(prediction):
29
  if prediction == 'Red':
30
  return 'Red'
31
  elif prediction == 'Blue':
 
11
  st.title("Colors Prediction")
12
 
13
  with st.form("questionaire"):
14
+ Color = st.selectbox("Color", unique_Color)
15
 
16
  clicked = st.form_submit_button("Predict Color")
17
  if clicked:
18
+ result=model.predict(pd.DataFrame({"Color":[Color]}))
19
  #result=model.predict(pd.DataFrame({"Room": [room],
20
  # "Partitions": [partition],
21
  # "Rows": [rows],
22
  # "Columns": [columns],
23
  # "Color": [color]}))
24
+ predicted_Color = predict_Color(result)
25
  #result = 'Red' = Red if result[0] == 1 else 'Blue'
26
  st.success('The predicted color is {}'.format(predicted_color))
27
 
28
+ def predict_Color(prediction):
29
  if prediction == 'Red':
30
  return 'Red'
31
  elif prediction == 'Blue':