Spaces:
Running
Running
ChenyuRabbitLove
commited on
Commit
•
e791b25
1
Parent(s):
a7ed083
refactor: change the logic of rendering player info
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def get_player_info(player_backend_user_id):
|
|
21 |
|
22 |
# start of gradio interface
|
23 |
with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
24 |
-
player_info = gr.State()
|
25 |
|
26 |
with gr.Row():
|
27 |
with gr.Column(
|
@@ -103,11 +103,9 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
|
103 |
player_info_query_btn = gr.Button("Query")
|
104 |
|
105 |
# actions when player login
|
106 |
-
player_info_query_btn.click(
|
107 |
-
|
108 |
-
|
109 |
-
get_player_achievement_logs_html, player_info, f
|
110 |
-
)
|
111 |
|
112 |
if __name__ == "__main__":
|
113 |
demo.launch()
|
|
|
21 |
|
22 |
# start of gradio interface
|
23 |
with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
24 |
+
player_info = gr.State(get_player_info("http://id.junyiacademy.org/d6317d299321450191dd5da599a48b3d"))
|
25 |
|
26 |
with gr.Row():
|
27 |
with gr.Column(
|
|
|
103 |
player_info_query_btn = gr.Button("Query")
|
104 |
|
105 |
# actions when player login
|
106 |
+
player_info_query_btn.click(get_player_partners, player_info, pet_gallery)
|
107 |
+
player_info_query_btn.click(get_player_badges, player_info, badge_gallery)
|
108 |
+
player_info_query_btn.click(get_player_achievement_logs_html, player_info, f)
|
|
|
|
|
109 |
|
110 |
if __name__ == "__main__":
|
111 |
demo.launch()
|