Ludwig Stumpp commited on
Commit
48cd666
β€’
1 Parent(s): ec21a67

Move data files and specify as constant

Browse files
README.md CHANGED
@@ -13,8 +13,8 @@ We are always happy for contributions! You can contribute by the following:
13
 
14
  - table work:
15
  - filling missing entries
16
- - adding a new model as a new row in `leaderboard.csv`, add the source of the evaluation to `sources.csv`
17
- - adding a new benchmark as a new column in `leaderboard.csv` and add the benchmark to `benchmarks.csv`
18
  - code work:
19
  - improving the existing code
20
  - requesting and implementing new features
 
13
 
14
  - table work:
15
  - filling missing entries
16
+ - adding a new model as a new row in `data/leaderboard.csv`, add the source of the evaluation to `data/sources.csv`
17
+ - adding a new benchmark as a new column in `data/leaderboard.csv` and add the benchmark to `data/benchmarks.csv`
18
  - code work:
19
  - improving the existing code
20
  - requesting and implementing new features
benchmarks.csv β†’ data/benchmarks.csv RENAMED
File without changes
leaderboard.csv β†’ data/leaderboard.csv RENAMED
File without changes
sources.csv β†’ data/sources.csv RENAMED
File without changes
streamlit_app.py CHANGED
@@ -1,10 +1,11 @@
1
- import io
2
-
3
  import pandas as pd
4
  import requests
5
  import streamlit as st
6
 
7
  REPO_URL = "https://github.com/LudwigStumpp/llm-leaderboard"
 
 
 
8
 
9
 
10
  def grab_file_from_repo(repo_url: str, filename: str) -> str:
@@ -73,8 +74,7 @@ def setup_basic():
73
 
74
 
75
  def setup_table():
76
- csv_table = grab_file_from_repo(REPO_URL, "leaderboard.csv")
77
- df = pd.read_csv(io.StringIO(csv_table), index_col=0)
78
  df = df.sort_index(ascending=True)
79
  df = df.replace(r"^\s*$", float("nan"), regex=True)
80
  df = df.astype(float, errors="ignore")
@@ -84,8 +84,7 @@ def setup_table():
84
 
85
 
86
  def setup_benchmarks():
87
- csv_table = grab_file_from_repo(REPO_URL, "benchmarks.csv")
88
- df = pd.read_csv(io.StringIO(csv_table), index_col=0)
89
  df = df.sort_index(ascending=True)
90
 
91
  st.markdown("### Covered Benchmarks")
@@ -101,8 +100,7 @@ def setup_benchmarks():
101
 
102
 
103
  def setup_sources():
104
- csv_table = grab_file_from_repo(REPO_URL, "sources.csv")
105
- df = pd.read_csv(io.StringIO(csv_table), index_col=0)
106
  df = df.sort_index(ascending=True)
107
 
108
  st.markdown("### Sources of Above Figures")
 
 
 
1
  import pandas as pd
2
  import requests
3
  import streamlit as st
4
 
5
  REPO_URL = "https://github.com/LudwigStumpp/llm-leaderboard"
6
+ LEADERBOARD_PATH = "data/leaderboard.csv"
7
+ BENCHMARKS_PATH = "data/benchmarks.csv"
8
+ SOURCES_PATH = "data/sources.csv"
9
 
10
 
11
  def grab_file_from_repo(repo_url: str, filename: str) -> str:
 
74
 
75
 
76
  def setup_table():
77
+ df = pd.read_csv(LEADERBOARD_PATH, index_col=0)
 
78
  df = df.sort_index(ascending=True)
79
  df = df.replace(r"^\s*$", float("nan"), regex=True)
80
  df = df.astype(float, errors="ignore")
 
84
 
85
 
86
  def setup_benchmarks():
87
+ df = pd.read_csv(BENCHMARKS_PATH, index_col=0)
 
88
  df = df.sort_index(ascending=True)
89
 
90
  st.markdown("### Covered Benchmarks")
 
100
 
101
 
102
  def setup_sources():
103
+ df = pd.read_csv(SOURCES_PATH, index_col=0)
 
104
  df = df.sort_index(ascending=True)
105
 
106
  st.markdown("### Sources of Above Figures")