Commit
·
ac4124a
1
Parent(s):
8b2171f
patch: fix deprecated arg
Browse files
app.py
CHANGED
|
@@ -7,12 +7,10 @@ import match_parser as mp
|
|
| 7 |
|
| 8 |
def usatt_rating_analyzer(file_obj):
|
| 9 |
# Load data.
|
| 10 |
-
|
| 11 |
-
df, is_tournament = mp.load_match_df(file_path)
|
| 12 |
|
| 13 |
# Create outputs.
|
| 14 |
-
|
| 15 |
-
player_name = mp.get_player_name(file_path.stem)
|
| 16 |
current_rating = mp.get_current_rating(df)
|
| 17 |
peak_rating = mp.get_max_rating(df)
|
| 18 |
n_competitions_played = mp.get_num_competitions_played(df, is_tournament)
|
|
@@ -66,7 +64,7 @@ with gr.Blocks() as demo:
|
|
| 66 |
""")
|
| 67 |
with gr.Row():
|
| 68 |
with gr.Column():
|
| 69 |
-
input_file = gr.File(label='USATT Results File', file_types=['file']
|
| 70 |
btn = gr.Button(analyze_btn_title)
|
| 71 |
|
| 72 |
gr.Markdown("""<br />
|
|
|
|
| 7 |
|
| 8 |
def usatt_rating_analyzer(file_obj):
|
| 9 |
# Load data.
|
| 10 |
+
df, is_tournament = mp.load_match_df(Path(file_obj.name))
|
|
|
|
| 11 |
|
| 12 |
# Create outputs.
|
| 13 |
+
player_name = mp.get_player_name(Path(file_obj.orig_name).stem)
|
|
|
|
| 14 |
current_rating = mp.get_current_rating(df)
|
| 15 |
peak_rating = mp.get_max_rating(df)
|
| 16 |
n_competitions_played = mp.get_num_competitions_played(df, is_tournament)
|
|
|
|
| 64 |
""")
|
| 65 |
with gr.Row():
|
| 66 |
with gr.Column():
|
| 67 |
+
input_file = gr.File(label='USATT Results File', file_types=['file'])
|
| 68 |
btn = gr.Button(analyze_btn_title)
|
| 69 |
|
| 70 |
gr.Markdown("""<br />
|