Spaces:
Sleeping
Sleeping
fifa19_streamlit
Browse files
app.py
CHANGED
|
@@ -127,26 +127,34 @@ def main():
|
|
| 127 |
with left_col:
|
| 128 |
# Add business context and description
|
| 129 |
st.markdown("""
|
| 130 |
-
|
|
|
|
| 131 |
This FIFA 19 Player Recommender helps football clubs and managers identify similar players and predict their market value.
|
| 132 |
It's particularly useful for:
|
| 133 |
-
|
| 134 |
-
-
|
| 135 |
-
|
| 136 |
-
|
|
|
|
|
|
|
|
|
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
|
|
|
|
|
|
| 142 |
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
|
|
|
| 150 |
|
| 151 |
# Sidebar inputs
|
| 152 |
st.sidebar.header("Search Parameters")
|
|
@@ -166,15 +174,17 @@ def main():
|
|
| 166 |
recommendations = player_sim_team(team_chosen, postion_chosen, num_of_players, age_up)
|
| 167 |
|
| 168 |
# Display results in a nice format
|
| 169 |
-
st.
|
|
|
|
|
|
|
| 170 |
|
| 171 |
# Create a container for recommendations
|
| 172 |
for idx, player in enumerate(recommendations, 1):
|
| 173 |
with st.container():
|
| 174 |
st.markdown(f"""
|
| 175 |
-
|
| 176 |
-
<
|
| 177 |
-
<hr style='margin:
|
| 178 |
""", unsafe_allow_html=True)
|
| 179 |
|
| 180 |
if __name__ == '__main__':
|
|
|
|
| 127 |
with left_col:
|
| 128 |
# Add business context and description
|
| 129 |
st.markdown("""
|
| 130 |
+
<h4 style='font-size: 18px;'>About this App</h4>
|
| 131 |
+
<p style='font-size: 14px;'>
|
| 132 |
This FIFA 19 Player Recommender helps football clubs and managers identify similar players and predict their market value.
|
| 133 |
It's particularly useful for:
|
| 134 |
+
</p>
|
| 135 |
+
<ul style='font-size: 14px;'>
|
| 136 |
+
<li>Scouting potential replacements for current players</li>
|
| 137 |
+
<li>Finding undervalued talents in the market</li>
|
| 138 |
+
<li>Discovering players that match your team's playing style</li>
|
| 139 |
+
<li>Making informed decisions about player acquisitions</li>
|
| 140 |
+
</ul>
|
| 141 |
|
| 142 |
+
<h4 style='font-size: 18px;'>How it Works</h4>
|
| 143 |
+
<ol style='font-size: 14px;'>
|
| 144 |
+
<li>The app uses advanced machine learning to analyze player attributes and find similar players</li>
|
| 145 |
+
<li>It considers over 70 different player statistics and characteristics</li>
|
| 146 |
+
<li>Provides market value predictions to help with transfer budget planning</li>
|
| 147 |
+
</ol>
|
| 148 |
|
| 149 |
+
<h4 style='font-size: 18px;'>How to Use</h4>
|
| 150 |
+
<ol style='font-size: 14px;'>
|
| 151 |
+
<li><b>Select Your Team</b> from the sidebar - this helps find players that would fit your team's style</li>
|
| 152 |
+
<li><b>Choose Position</b> you're looking to fill</li>
|
| 153 |
+
<li><b>Adjust Number of Recommendations</b> (1-10 players)</li>
|
| 154 |
+
<li><b>Set Maximum Age</b> to focus on your preferred age range</li>
|
| 155 |
+
<li>Click "Get Recommendations" to see your matches!</li>
|
| 156 |
+
</ol>
|
| 157 |
+
""", unsafe_allow_html=True)
|
| 158 |
|
| 159 |
# Sidebar inputs
|
| 160 |
st.sidebar.header("Search Parameters")
|
|
|
|
| 174 |
recommendations = player_sim_team(team_chosen, postion_chosen, num_of_players, age_up)
|
| 175 |
|
| 176 |
# Display results in a nice format
|
| 177 |
+
st.markdown(f"""
|
| 178 |
+
<h4 style='font-size: 18px;'>Recommended Players for {team_chosen} - {postion_chosen}</h4>
|
| 179 |
+
""", unsafe_allow_html=True)
|
| 180 |
|
| 181 |
# Create a container for recommendations
|
| 182 |
for idx, player in enumerate(recommendations, 1):
|
| 183 |
with st.container():
|
| 184 |
st.markdown(f"""
|
| 185 |
+
<div style='font-size: 16px;'><b>Recommendation #{idx}: {player['player_name']}</b></div>
|
| 186 |
+
<div style='font-size: 13px; color: #888;'>Estimated Value: €{player['starting_bid']:,.0f}</div>
|
| 187 |
+
<hr style='margin: 3px 0px;'>
|
| 188 |
""", unsafe_allow_html=True)
|
| 189 |
|
| 190 |
if __name__ == '__main__':
|