File size: 1,142 Bytes
0e7f11a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import os

import gradio as gr
from huggingface_hub import HfFileSystem

from src.assets.text_content import INTRODUCTION_TEXT, TITLE

from src.load_from_hub import load_from_hub

RESULTS_REPO = os.environ.get("RESULTS_REPO", "datasets/vlsp-2023-vllm/vllms-leaderboard")
HIDDEN_TOKEN = os.environ.get("HIDDEN_TOKEN")

fs = HfFileSystem(token=HIDDEN_TOKEN)

leaderboard_df = load_from_hub(fs, RESULTS_REPO)

demo = gr.Blocks()

with demo:
    gr.HTML(TITLE)
    gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")

    with gr.Tabs(elem_classes="tab-buttons") as tabs:
        with gr.TabItem("VLLMs Benchmark", elem_id="llm-benchmark-tab-table", id=0):
            with gr.Column():
                with gr.Row():
                    search_bar = gr.Textbox(
                        placeholder=" 🔍 Search for your model and press ENTER...",
                        show_label=False,
                        elem_id="search-bar",
                    )
                with gr.Row():
                    leaderboard_table = gr.components.Dataframe(
                        value=leaderboard_df,
                    )

demo.launch()