Commit
·
85f74f8
1
Parent(s):
906d634
Update app.py
Browse files
app.py
CHANGED
@@ -22,6 +22,7 @@ def usatt_rating_analyzer(file_obj):
|
|
22 |
most_frequent_opponents = mp.make_df_columns_readable(mp.get_most_frequent_opponents(df), is_tournament)
|
23 |
best_wins = mp.make_df_columns_readable(mp.get_best_wins(df), is_tournament)
|
24 |
biggest_upsets = mp.make_df_columns_readable(mp.get_biggest_upsets(df), is_tournament)
|
|
|
25 |
highest_rated_opponent = mp.make_df_columns_readable(mp.get_highest_rated_opponent(df), is_tournament)
|
26 |
rating_over_time_fig = mp.get_rating_over_time_fig(df, is_tournament)
|
27 |
match_with_longest_game = mp.make_df_columns_readable(mp.get_match_with_longest_game(df, is_tournament), is_tournament)
|
@@ -38,6 +39,7 @@ def usatt_rating_analyzer(file_obj):
|
|
38 |
opponent_rating_dist_over_time_fig,
|
39 |
best_wins,
|
40 |
biggest_upsets,
|
|
|
41 |
best_competitions,
|
42 |
most_frequent_opponents,
|
43 |
highest_rated_opponent,
|
@@ -102,7 +104,7 @@ with gr.Blocks() as demo:
|
|
102 |
|
103 |
gr.Markdown("""<br />
|
104 |
|
105 |
-
## Best Matches
|
106 |
|
107 |
<br />
|
108 |
""")
|
@@ -113,6 +115,9 @@ with gr.Blocks() as demo:
|
|
113 |
max_rows=5)
|
114 |
biggest_upsets_gdf = gr.Dataframe(label="Biggest upsets (matches won sorted by rating - opponent post-competition rating)",
|
115 |
max_rows=5)
|
|
|
|
|
|
|
116 |
|
117 |
gr.Markdown("""<br />
|
118 |
|
@@ -151,6 +156,7 @@ with gr.Blocks() as demo:
|
|
151 |
opponent_rating_dist_over_time_plot,
|
152 |
best_wins_gdf,
|
153 |
biggest_upsets_gdf,
|
|
|
154 |
best_competitions_gdf,
|
155 |
most_frequent_opponents_gdf,
|
156 |
highest_rated_opponent_gdf,
|
|
|
22 |
most_frequent_opponents = mp.make_df_columns_readable(mp.get_most_frequent_opponents(df), is_tournament)
|
23 |
best_wins = mp.make_df_columns_readable(mp.get_best_wins(df), is_tournament)
|
24 |
biggest_upsets = mp.make_df_columns_readable(mp.get_biggest_upsets(df), is_tournament)
|
25 |
+
worst_recent_losses = mp.make_df_columns_readable(mp.get_worst_recent_losses(df, is_tournament), is_tournament)
|
26 |
highest_rated_opponent = mp.make_df_columns_readable(mp.get_highest_rated_opponent(df), is_tournament)
|
27 |
rating_over_time_fig = mp.get_rating_over_time_fig(df, is_tournament)
|
28 |
match_with_longest_game = mp.make_df_columns_readable(mp.get_match_with_longest_game(df, is_tournament), is_tournament)
|
|
|
39 |
opponent_rating_dist_over_time_fig,
|
40 |
best_wins,
|
41 |
biggest_upsets,
|
42 |
+
worst_recent_losses,
|
43 |
best_competitions,
|
44 |
most_frequent_opponents,
|
45 |
highest_rated_opponent,
|
|
|
104 |
|
105 |
gr.Markdown("""<br />
|
106 |
|
107 |
+
## Best and Worst Matches
|
108 |
|
109 |
<br />
|
110 |
""")
|
|
|
115 |
max_rows=5)
|
116 |
biggest_upsets_gdf = gr.Dataframe(label="Biggest upsets (matches won sorted by rating - opponent post-competition rating)",
|
117 |
max_rows=5)
|
118 |
+
worst_recent_losses_gdf = gr.Dataframe(label="Worst recent losses (matches lost sorted by rating - "
|
119 |
+
"opponent post-competition rating from the 5 most recent "
|
120 |
+
"competitions)", max_rows=5)
|
121 |
|
122 |
gr.Markdown("""<br />
|
123 |
|
|
|
156 |
opponent_rating_dist_over_time_plot,
|
157 |
best_wins_gdf,
|
158 |
biggest_upsets_gdf,
|
159 |
+
worst_recent_losses_gdf,
|
160 |
best_competitions_gdf,
|
161 |
most_frequent_opponents_gdf,
|
162 |
highest_rated_opponent_gdf,
|