Spaces:
Sleeping
Sleeping
Jimin Park
commited on
Commit
·
3ae02f6
1
Parent(s):
14d8730
added new structure
Browse files- util/app.py +12 -5
util/app.py
CHANGED
@@ -135,18 +135,25 @@ def show_stats(player_opgg_url):
|
|
135 |
4: "Aggressive/Fighter",
|
136 |
5: "Undefined"
|
137 |
}
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
-
# Format HTML output
|
141 |
stats_html = f"""
|
142 |
<div style='padding: 20px; background: #f5f5f5; border-radius: 10px;'>
|
143 |
<h3>Player's Recent Stats</h3>
|
144 |
<p>Wins: {wins} | Losses: {losses}</p>
|
145 |
<p>Winrate: {winrate}</p>
|
146 |
<p>Favorite Champions: {', '.join(favorite_champions)}</p>
|
147 |
-
<p>Playstyle: {
|
148 |
-
<p>Role Specialization: {role_specialization}</p>
|
149 |
-
<p>Champion Loyalty Score: {champion_loyalty_score
|
150 |
</div>
|
151 |
"""
|
152 |
|
|
|
135 |
4: "Aggressive/Fighter",
|
136 |
5: "Undefined"
|
137 |
}
|
138 |
+
|
139 |
+
role_specialization_map = {
|
140 |
+
0: "Pure Specialist",
|
141 |
+
1: "Strong Dual Role",
|
142 |
+
2: "Primary Role with Backups",
|
143 |
+
3: "Role Swapper",
|
144 |
+
4: "True Flex",
|
145 |
+
5: "Undefined"
|
146 |
+
}
|
147 |
|
|
|
148 |
stats_html = f"""
|
149 |
<div style='padding: 20px; background: #f5f5f5; border-radius: 10px;'>
|
150 |
<h3>Player's Recent Stats</h3>
|
151 |
<p>Wins: {wins} | Losses: {losses}</p>
|
152 |
<p>Winrate: {winrate}</p>
|
153 |
<p>Favorite Champions: {', '.join(favorite_champions)}</p>
|
154 |
+
<p>Playstyle: {playstyle_mapping.get(playstyle, 'N/A')}</p>
|
155 |
+
<p>Role Specialization: {role_specialization_map.get(role_specialization, 'N/A')}</p>
|
156 |
+
<p>Champion Loyalty Score: {champion_loyalty_score}</p>
|
157 |
</div>
|
158 |
"""
|
159 |
|