Jimin Park
commited on
Commit
·
07eb8a0
1
Parent(s):
291e330
added model
Browse files- README.md +1 -1
- util/app_training_df_getter.py +6 -4
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title: League Champion Predictor
|
| 3 |
emoji: 🎮
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: red
|
|
|
|
| 1 |
---
|
| 2 |
+
title: League Champion Pick Predictor
|
| 3 |
emoji: 🎮
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: red
|
util/app_training_df_getter.py
CHANGED
|
@@ -409,8 +409,8 @@ def create_app_user_training_df(url):
|
|
| 409 |
print("Recent matches columns:", recent_stats.columns.tolist())
|
| 410 |
|
| 411 |
# Check if player_id exists before trying to process it
|
| 412 |
-
if 'player_id' not in recent_stats.columns:
|
| 413 |
-
|
| 414 |
|
| 415 |
# Process player_id
|
| 416 |
recent_stats['player_id'] = recent_stats['player_id'].str.replace(" #", "-", regex=False)
|
|
@@ -418,7 +418,7 @@ def create_app_user_training_df(url):
|
|
| 418 |
|
| 419 |
# Get player stats
|
| 420 |
print("Fetching player stats...")
|
| 421 |
-
player_stats = get_player_stats(region, username)
|
| 422 |
|
| 423 |
# Validate player_stats
|
| 424 |
if player_stats is None or player_stats.empty:
|
|
@@ -463,4 +463,6 @@ def create_app_user_training_df(url):
|
|
| 463 |
# meta_stats = get_meta_stats()
|
| 464 |
# print(meta_stats)
|
| 465 |
|
| 466 |
-
|
|
|
|
|
|
|
|
|
| 409 |
print("Recent matches columns:", recent_stats.columns.tolist())
|
| 410 |
|
| 411 |
# Check if player_id exists before trying to process it
|
| 412 |
+
#if 'player_id' not in recent_stats.columns:
|
| 413 |
+
# raise KeyError("player_id column not found in recent_stats")
|
| 414 |
|
| 415 |
# Process player_id
|
| 416 |
recent_stats['player_id'] = recent_stats['player_id'].str.replace(" #", "-", regex=False)
|
|
|
|
| 418 |
|
| 419 |
# Get player stats
|
| 420 |
print("Fetching player stats...")
|
| 421 |
+
player_stats, metadata = get_player_stats(region, username)
|
| 422 |
|
| 423 |
# Validate player_stats
|
| 424 |
if player_stats is None or player_stats.empty:
|
|
|
|
| 463 |
# meta_stats = get_meta_stats()
|
| 464 |
# print(meta_stats)
|
| 465 |
|
| 466 |
+
#url = "https://www.op.gg/summoners/euw/Agurin-EUW?queue_type=soloranked"
|
| 467 |
+
#return_value = create_app_user_training_df(url)
|
| 468 |
+
#print("return value: ", return_value)
|