Spaces:
Running
Running
ChenyuRabbitLove
commited on
Commit
•
07dc7e1
1
Parent(s):
09ec489
fix: change pull player info API to textbox submit
Browse files
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 |
-
|
101 |
|
102 |
# actions when player login
|
103 |
player_info_query_btn.click(get_player_info, player_backend_id, player_info).then(
|
@@ -114,7 +114,12 @@ 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 |
-
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
if __name__ == "__main__":
|
120 |
demo.launch()
|
|
|
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 |
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__":
|
125 |
demo.launch()
|