Spaces:
Running
Running
kz-transformers
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def submit_file(v, file_path, mn, profile: gr.OAuthProfile | None):
|
|
36 |
API.upload_file(
|
37 |
path_or_fileobj=buf,
|
38 |
path_in_repo="model_data/external/" + profile.username+mn + ".json",
|
39 |
-
repo_id="
|
40 |
repo_type="dataset",
|
41 |
)
|
42 |
os.environ[RESET_JUDGEMENT_ENV] = "1"
|
@@ -76,7 +76,7 @@ def update_plot(selected_models):
|
|
76 |
|
77 |
def build_demo():
|
78 |
download_openbench()
|
79 |
-
demo = gr.Blocks(title="
|
80 |
leaderboard_df = build_leadearboard_df()
|
81 |
with demo:
|
82 |
gr.HTML(TITLE)
|
@@ -112,33 +112,6 @@ def build_demo():
|
|
112 |
|
113 |
with gr.Column():
|
114 |
|
115 |
-
# def upload_file(file,su,mn):
|
116 |
-
# file_path = file.name.split("/")[-1] if "/" in file.name else file.name
|
117 |
-
# logging.info("New submition: file saved to %s", file_path)
|
118 |
-
# with open(file.name, "r") as f:
|
119 |
-
# v=json.load(f)
|
120 |
-
# new_file = v['results']
|
121 |
-
# new_file['model'] = mn+"/"+su
|
122 |
-
# new_file['moviesmc']=new_file['moviemc']["acc,none"]
|
123 |
-
# new_file['musicmc']=new_file['musicmc']["acc,none"]
|
124 |
-
# new_file['booksmc']=new_file['bookmc']["acc,none"]
|
125 |
-
# new_file['lawmc']=new_file['lawmc']["acc,none"]
|
126 |
-
# # name = v['config']["model_args"].split('=')[1].split(',')[0]
|
127 |
-
# new_file['model_dtype'] = v['config']["model_dtype"]
|
128 |
-
# new_file['ppl'] = 0
|
129 |
-
# new_file.pop('moviemc')
|
130 |
-
# new_file.pop('bookmc')
|
131 |
-
# buf = BytesIO()
|
132 |
-
# buf.write(json.dumps(new_file).encode('utf-8'))
|
133 |
-
# API.upload_file(
|
134 |
-
# path_or_fileobj=buf,
|
135 |
-
# path_in_repo="model_data/external/" + su+mn + ".json",
|
136 |
-
# repo_id="Vikhrmodels/s-openbench-eval",
|
137 |
-
# repo_type="dataset",
|
138 |
-
# )
|
139 |
-
# os.environ[RESET_JUDGEMENT_ENV] = "1"
|
140 |
-
# return file.name
|
141 |
-
# gr.LoginButton()
|
142 |
model_name_textbox = gr.Textbox(label="Model name")
|
143 |
# submitter_username = gr.Textbox(label="Username")
|
144 |
|
@@ -206,7 +179,7 @@ def update_board():
|
|
206 |
# the "m_data" directory before downloading new dataset files into it.
|
207 |
# shutil.rmtree("./m_data")
|
208 |
# shutil.rmtree("./data")
|
209 |
-
download_dataset("
|
210 |
data_list = [{"musicmc": 0.3021276595744681, "lawmc": 0.2800829875518672, "model": "apsys/saiga_3_8b", "moviesmc": 0.3472222222222222, "booksmc": 0.2800829875518672, "model_dtype": "torch.float16", "ppl": 0, 'mmluproru':0}]
|
211 |
for file in glob.glob("./m_data/model_data/external/*.json"):
|
212 |
with open(file) as f:
|
@@ -228,7 +201,7 @@ def update_board():
|
|
228 |
API.upload_file(
|
229 |
path_or_fileobj="genned.json",
|
230 |
path_in_repo="leaderboard.json",
|
231 |
-
repo_id="
|
232 |
repo_type="dataset",
|
233 |
)
|
234 |
restart_space()
|
@@ -251,7 +224,7 @@ def update_board_():
|
|
251 |
# the "m_data" directory before downloading new dataset files into it.
|
252 |
# shutil.rmtree("./m_data")
|
253 |
# shutil.rmtree("./data")
|
254 |
-
download_dataset("
|
255 |
data_list = [{"musicmc": 0.3021276595744681, "lawmc": 0.2800829875518672, "model": "apsys/saiga_3_8b", "moviesmc": 0.3472222222222222, "booksmc": 0.2800829875518672, "model_dtype": "torch.float16", "ppl": 0, 'mmluproru':0}]
|
256 |
for file in glob.glob("./m_data/model_data/external/*.json"):
|
257 |
with open(file) as f:
|
@@ -273,7 +246,7 @@ def update_board_():
|
|
273 |
API.upload_file(
|
274 |
path_or_fileobj="genned.json",
|
275 |
path_in_repo="leaderboard.json",
|
276 |
-
repo_id="
|
277 |
repo_type="dataset",
|
278 |
)
|
279 |
|
|
|
36 |
API.upload_file(
|
37 |
path_or_fileobj=buf,
|
38 |
path_in_repo="model_data/external/" + profile.username+mn + ".json",
|
39 |
+
repo_id="kz-transformers/s-openbench-eval",
|
40 |
repo_type="dataset",
|
41 |
)
|
42 |
os.environ[RESET_JUDGEMENT_ENV] = "1"
|
|
|
76 |
|
77 |
def build_demo():
|
78 |
download_openbench()
|
79 |
+
demo = gr.Blocks(title="Kaz LLM LB", css=custom_css)
|
80 |
leaderboard_df = build_leadearboard_df()
|
81 |
with demo:
|
82 |
gr.HTML(TITLE)
|
|
|
112 |
|
113 |
with gr.Column():
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
model_name_textbox = gr.Textbox(label="Model name")
|
116 |
# submitter_username = gr.Textbox(label="Username")
|
117 |
|
|
|
179 |
# the "m_data" directory before downloading new dataset files into it.
|
180 |
# shutil.rmtree("./m_data")
|
181 |
# shutil.rmtree("./data")
|
182 |
+
download_dataset("kz-transformers/s-openbench-eval", "m_data")
|
183 |
data_list = [{"musicmc": 0.3021276595744681, "lawmc": 0.2800829875518672, "model": "apsys/saiga_3_8b", "moviesmc": 0.3472222222222222, "booksmc": 0.2800829875518672, "model_dtype": "torch.float16", "ppl": 0, 'mmluproru':0}]
|
184 |
for file in glob.glob("./m_data/model_data/external/*.json"):
|
185 |
with open(file) as f:
|
|
|
201 |
API.upload_file(
|
202 |
path_or_fileobj="genned.json",
|
203 |
path_in_repo="leaderboard.json",
|
204 |
+
repo_id="kz-transformers/kaz-llm-lb-metainfo",
|
205 |
repo_type="dataset",
|
206 |
)
|
207 |
restart_space()
|
|
|
224 |
# the "m_data" directory before downloading new dataset files into it.
|
225 |
# shutil.rmtree("./m_data")
|
226 |
# shutil.rmtree("./data")
|
227 |
+
download_dataset("kz-transformers/s-openbench-eval", "m_data")
|
228 |
data_list = [{"musicmc": 0.3021276595744681, "lawmc": 0.2800829875518672, "model": "apsys/saiga_3_8b", "moviesmc": 0.3472222222222222, "booksmc": 0.2800829875518672, "model_dtype": "torch.float16", "ppl": 0, 'mmluproru':0}]
|
229 |
for file in glob.glob("./m_data/model_data/external/*.json"):
|
230 |
with open(file) as f:
|
|
|
246 |
API.upload_file(
|
247 |
path_or_fileobj="genned.json",
|
248 |
path_in_repo="leaderboard.json",
|
249 |
+
repo_id="kz-transformers/kaz-llm-lb-metainfo",
|
250 |
repo_type="dataset",
|
251 |
)
|
252 |
|