lrschuman17 commited on
Commit
f707102
·
verified ·
1 Parent(s): f633c03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -163,15 +163,10 @@ def main():
163
  # Predict and display results
164
  if st.sidebar.button("Predict"):
165
  predictions = rf_model.predict(input_data)
166
- # Round predictions to two decimal places
167
  predictions = predictions.round(2)
168
-
169
- # Define column names for the output table
170
- prediction_columns = ["Predicted Change in PTS", "Predicted Change in REB", "Predicted Change in AST"]
171
-
172
  st.subheader("Predicted Post-Injury Performance")
173
  st.write("Based on the inputs, here are the predicted metrics:")
174
- st.table(pd.DataFrame([predictions], columns=prediction_columns))
175
  st.table(pd.DataFrame(predictions, columns=prediction_columns))
176
  except FileNotFoundError:
177
  st.error("Model file not found.")
 
163
  # Predict and display results
164
  if st.sidebar.button("Predict"):
165
  predictions = rf_model.predict(input_data)
 
166
  predictions = predictions.round(2)
167
+ prediction_columns = ["Predicted Change in PTS", "Predicted Change in REB", "Predicted Change inAST"]
 
 
 
168
  st.subheader("Predicted Post-Injury Performance")
169
  st.write("Based on the inputs, here are the predicted metrics:")
 
170
  st.table(pd.DataFrame(predictions, columns=prediction_columns))
171
  except FileNotFoundError:
172
  st.error("Model file not found.")