Deeplink to autoselect a model when opening the leaderboard

#462
by Wauplin HF staff - opened
Hugging Face H4 org
edited Dec 13, 2023

The goal of this PR is to enable urls opening the leaderboard with a search query already setup.
Example: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard-ci-pr-462?query=Qwen/Qwen-72B

How it works:

  1. when loading page, a load_query method is triggered (only once) and checks the gr.Request object
  2. it sets the search bar value to request.query_params.get("query") or ""
  3. it also sets a this value to a hidden component. If this hidden component value changes, it triggers a reload of the dataframe with the given query
    => this way, we do not reload the dataframe for every users but only if a query parameter is defined.
Hugging Face H4 org

Following the creation of this PR, an ephemeral Space HuggingFaceH4/open_llm_leaderboard-ci-pr-462 has been started. Any changes pushed to this PR will be synced with the test Space.
Since this PR has been created by a trusted author, the ephemeral Space has been configured with the correct hardware, storage, and secrets.
(This is an automated message.)

Wauplin changed pull request title from [WIP] to Deeplink to open the leaderboard with a certain query
Wauplin changed pull request title from Deeplink to open the leaderboard with a certain query to Deeplink to autoselect a model when opening the leaderboard
Hugging Face H4 org

LGTM, thanks a lot!!

clefourrier changed pull request status to merged
Hugging Face H4 org

PR is now merged/closed. The ephemeral Space has been deleted.
(This is an automated message.)

Sign up or log in to comment