Jimin Park commited on
Commit
cc07c1e
·
1 Parent(s): 0367bbe

added new structure

Browse files
Files changed (2) hide show
  1. util/app.py +1 -1
  2. util/app_training_df_getter.py +0 -10
util/app.py CHANGED
@@ -273,7 +273,7 @@ with gr.Blocks() as demo:
273
  )
274
 
275
  predict_button.click(
276
- fn=predict_champion,
277
  inputs=[player_opgg_url] + champion_dropdowns,
278
  outputs=prediction_output
279
  )
 
273
  )
274
 
275
  predict_button.click(
276
+ fn=predict_top_5_champion_w_confidence,
277
  inputs=[player_opgg_url] + champion_dropdowns,
278
  outputs=prediction_output
279
  )
util/app_training_df_getter.py CHANGED
@@ -380,10 +380,6 @@ def create_app_user_training_df(url):
380
 
381
  #print("Recent matches columns:", recent_stats.columns.tolist())
382
 
383
- # Check if player_id exists before trying to process it
384
- #if 'player_id' not in recent_stats.columns:
385
- # raise KeyError("player_id column not found in recent_stats")
386
-
387
  # Process player_id
388
  recent_stats['player_id'] = recent_stats['player_id'].str.replace(" #", "-", regex=False)
389
  #print("Processed player_ids:", recent_stats['player_id'].head())
@@ -391,12 +387,6 @@ def create_app_user_training_df(url):
391
  # Get player stats
392
  print("Fetching player stats...")
393
  player_stats = get_player_stats(region, username)
394
-
395
- # Validate player_stats DONT!!! its a tuple leave it be.
396
- #if player_stats is None or player_stats.empty:
397
- # raise ValueError("No player stats found")
398
-
399
- #print("Player stats columns:", player_stats.columns.tolist())
400
 
401
  # Merge stats
402
  print("Merging stats...")
 
380
 
381
  #print("Recent matches columns:", recent_stats.columns.tolist())
382
 
 
 
 
 
383
  # Process player_id
384
  recent_stats['player_id'] = recent_stats['player_id'].str.replace(" #", "-", regex=False)
385
  #print("Processed player_ids:", recent_stats['player_id'].head())
 
387
  # Get player stats
388
  print("Fetching player stats...")
389
  player_stats = get_player_stats(region, username)
 
 
 
 
 
 
390
 
391
  # Merge stats
392
  print("Merging stats...")