hi-melnikov commited on
Commit
6863798
β€’
1 Parent(s): ce477d4

first attempt to fix model download

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -7,16 +7,19 @@ import time
7
  import gradio as gr
8
  import pandas as pd
9
  from apscheduler.schedulers.background import BackgroundScheduler
 
10
  from gradio_space_ci import enable_space_ci
11
  from huggingface_hub import snapshot_download
12
 
13
  from src.display.about import (
14
- FAQ_TEXT,
15
  INTRODUCTION_TEXT,
16
- LLM_BENCHMARKS_TEXT,
17
  TITLE,
18
  )
19
  from src.display.css_html_js import custom_css
 
 
 
 
20
  from src.envs import (
21
  API,
22
  EVAL_RESULTS_PATH,
@@ -60,6 +63,7 @@ def download_dataset(repo_id, local_dir, repo_type="dataset", max_attempts=3, ba
60
  local_dir=local_dir,
61
  repo_type=repo_type,
62
  tqdm_class=None,
 
63
  etag_timeout=30,
64
  max_workers=8,
65
  )
@@ -96,14 +100,13 @@ def build_demo():
96
  title = "Chatbot Arena Leaderboard",
97
  css=custom_css
98
  )
99
- # leaderboard_df = build_leadearboard_df()
100
  with demo:
101
  gr.HTML(TITLE)
102
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
103
 
104
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
105
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
106
- """
107
  leaderboard = Leaderboard(
108
  value=leaderboard_df,
109
  datatype=[c.type for c in fields(AutoEvalColumn)],
@@ -122,15 +125,11 @@ def build_demo():
122
  # AutoEvalColumn.license.name
123
  ],
124
  )
125
- """
126
- pass
127
-
128
-
129
- with gr.TabItem("πŸ“ About", elem_id="llm-benchmark-tab-table", id=1):
130
- gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
131
 
132
- with gr.TabItem("❗FAQ", elem_id="llm-benchmark-tab-table", id=2):
133
- gr.Markdown(FAQ_TEXT, elem_classes="markdown-text")
 
 
134
 
135
  with gr.TabItem("πŸš€ Submit ", elem_id="llm-benchmark-tab-table", id=3):
136
 
 
7
  import gradio as gr
8
  import pandas as pd
9
  from apscheduler.schedulers.background import BackgroundScheduler
10
+ from gradio_leaderboard import Leaderboard, SelectColumns
11
  from gradio_space_ci import enable_space_ci
12
  from huggingface_hub import snapshot_download
13
 
14
  from src.display.about import (
 
15
  INTRODUCTION_TEXT,
 
16
  TITLE,
17
  )
18
  from src.display.css_html_js import custom_css
19
+ from src.display.utils import (
20
+ AutoEvalColumn,
21
+ fields,
22
+ )
23
  from src.envs import (
24
  API,
25
  EVAL_RESULTS_PATH,
 
63
  local_dir=local_dir,
64
  repo_type=repo_type,
65
  tqdm_class=None,
66
+ token=True,
67
  etag_timeout=30,
68
  max_workers=8,
69
  )
 
100
  title = "Chatbot Arena Leaderboard",
101
  css=custom_css
102
  )
103
+ leaderboard_df = build_leadearboard_df()
104
  with demo:
105
  gr.HTML(TITLE)
106
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
107
 
108
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
109
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
 
110
  leaderboard = Leaderboard(
111
  value=leaderboard_df,
112
  datatype=[c.type for c in fields(AutoEvalColumn)],
 
125
  # AutoEvalColumn.license.name
126
  ],
127
  )
 
 
 
 
 
 
128
 
129
+ #with gr.TabItem("πŸ“ About", elem_id="llm-benchmark-tab-table", id=1):
130
+ # gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
131
+ #with gr.TabItem("❗FAQ", elem_id="llm-benchmark-tab-table", id=2):
132
+ # gr.Markdown(FAQ_TEXT, elem_classes="markdown-text")
133
 
134
  with gr.TabItem("πŸš€ Submit ", elem_id="llm-benchmark-tab-table", id=3):
135