ChenyuRabbitLove commited on
Commit
26ab58a
1 Parent(s): 07dc7e1

fix: fix pull player info to data and fix Player model bug

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. utils/mes_player_model.py +1 -1
app.py CHANGED
@@ -97,7 +97,7 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
97
  player_info_query_btn = gr.Button(
98
  "Query", elem_id="trigger_button", visible=False
99
  )
100
- pull_newest_player_info = gr.Textbox("", visible=False)
101
 
102
  # actions when player login
103
  player_info_query_btn.click(get_player_info, player_backend_id, player_info).then(
@@ -114,11 +114,11 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
114
  player_info_query_btn.click(get_current_story, None, adventure)
115
  )
116
 
117
- pull_newest_player_info.submit(
118
  save_latest_player_data,
119
  None,
120
  None,
121
- api_name="pull_newest_player_info",
122
  )
123
 
124
  if __name__ == "__main__":
 
97
  player_info_query_btn = gr.Button(
98
  "Query", elem_id="trigger_button", visible=False
99
  )
100
+ pull_newest_player_data = gr.Textbox("", visible=False)
101
 
102
  # actions when player login
103
  player_info_query_btn.click(get_player_info, player_backend_id, player_info).then(
 
114
  player_info_query_btn.click(get_current_story, None, adventure)
115
  )
116
 
117
+ pull_newest_player_data.submit(
118
  save_latest_player_data,
119
  None,
120
  None,
121
+ api_name="pull_newest_player_data",
122
  )
123
 
124
  if __name__ == "__main__":
utils/mes_player_model.py CHANGED
@@ -30,7 +30,7 @@ class Player:
30
  self.assign_weekly_partner()
31
 
32
  @staticmethod
33
- def from_series(series: pd.Series) -> "Player":
34
  """
35
  Creates a Player instance from a pandas Series.
36
 
 
30
  self.assign_weekly_partner()
31
 
32
  @staticmethod
33
+ def from_dict(series: pd.Series) -> "Player":
34
  """
35
  Creates a Player instance from a pandas Series.
36