Tapanat commited on
Commit
aa32202
1 Parent(s): 4ce5e33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
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": [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(result))
 
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'