Skip to content

Commit

Permalink
Fix query params issue (#3519)
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyChouSr authored Sep 5, 2024
1 parent 1ccbe8b commit c4ef640
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fastchat/serve/gradio_web_server_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
logger = build_logger("gradio_web_server_multi", "gradio_web_server_multi.log")


def load_demo(context: Context, url_params, request: gr.Request):
def load_demo(context: Context, request: gr.Request):
ip = get_ip(request)
logger.info(f"load_demo. ip: {ip}. params: {url_params}")
logger.info(f"load_demo. ip: {ip}. params: {request.query_params}")

inner_selected = 0
if "arena" in request.query_params:
Expand Down Expand Up @@ -113,7 +113,7 @@ def load_demo(context: Context, url_params, request: gr.Request):
return tabs_list


def build_demo(context: Context, elo_results_file: str, leaderboard_table_file):
def build_demo(context: Context, elo_results_file: str, leaderboard_table_file: str):
if args.show_terms_of_use:
load_js = get_window_url_params_with_tos_js
else:
Expand Down Expand Up @@ -206,7 +206,7 @@ def build_demo(context: Context, elo_results_file: str, leaderboard_table_file):

demo.load(
load_demo,
[context_state, url_params],
[context_state],
demo_tabs,
js=load_js,
)
Expand Down

0 comments on commit c4ef640

Please sign in to comment.