Update app.py
Browse files
app.py
CHANGED
|
@@ -45,6 +45,9 @@ with st.form("prediction_form"):
|
|
| 45 |
'3PA', '3P%', 'FTM', 'FTA', 'FT%', 'OREB', 'DREB',
|
| 46 |
'REB', 'AST', 'STL', 'BLK', 'TOV'])
|
| 47 |
|
|
|
|
|
|
|
|
|
|
| 48 |
# Predict using the loaded model
|
| 49 |
prediction = model.predict(input_df)[0]
|
| 50 |
|
|
@@ -52,5 +55,4 @@ with st.form("prediction_form"):
|
|
| 52 |
if prediction == 1:
|
| 53 |
st.success('The rookie is likely to have a successful career spanning at least 5 years!')
|
| 54 |
else:
|
| 55 |
-
st.error('The rookie might not have a very successful career lasting at least 5 years.')
|
| 56 |
-
|
|
|
|
| 45 |
'3PA', '3P%', 'FTM', 'FTA', 'FT%', 'OREB', 'DREB',
|
| 46 |
'REB', 'AST', 'STL', 'BLK', 'TOV'])
|
| 47 |
|
| 48 |
+
# Ensure the input DataFrame structure matches the model's expected format
|
| 49 |
+
# (You might need to adjust this part based on how the model was trained)
|
| 50 |
+
|
| 51 |
# Predict using the loaded model
|
| 52 |
prediction = model.predict(input_df)[0]
|
| 53 |
|
|
|
|
| 55 |
if prediction == 1:
|
| 56 |
st.success('The rookie is likely to have a successful career spanning at least 5 years!')
|
| 57 |
else:
|
| 58 |
+
st.error('The rookie might not have a very successful career lasting at least 5 years.')
|
|
|