Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
hanhainebula
commited on
Commit
•
4cf5eb9
1
Parent(s):
4959887
Add reranker_name and reranker_link field
Browse files- app.py +6 -0
- src/utils.py +3 -1
app.py
CHANGED
@@ -333,6 +333,10 @@ with demo:
|
|
333 |
model_name = gr.Textbox(label="Model name")
|
334 |
with gr.Column():
|
335 |
model_url = gr.Textbox(label="Model URL")
|
|
|
|
|
|
|
|
|
336 |
with gr.Row():
|
337 |
upload_button = gr.UploadButton("Click to upload search results", file_count="single")
|
338 |
with gr.Row():
|
@@ -358,6 +362,8 @@ with demo:
|
|
358 |
file_output,
|
359 |
model_name,
|
360 |
model_url,
|
|
|
|
|
361 |
benchmark_version,
|
362 |
is_anonymous
|
363 |
],
|
|
|
333 |
model_name = gr.Textbox(label="Model name")
|
334 |
with gr.Column():
|
335 |
model_url = gr.Textbox(label="Model URL")
|
336 |
+
with gr.Column():
|
337 |
+
reranker_name = gr.Textbox(label="Reranker name")
|
338 |
+
with gr.Column():
|
339 |
+
reranker_url = gr.Textbox(label="Reranker URL")
|
340 |
with gr.Row():
|
341 |
upload_button = gr.UploadButton("Click to upload search results", file_count="single")
|
342 |
with gr.Row():
|
|
|
362 |
file_output,
|
363 |
model_name,
|
364 |
model_url,
|
365 |
+
reranker_name,
|
366 |
+
reranker_url,
|
367 |
benchmark_version,
|
368 |
is_anonymous
|
369 |
],
|
src/utils.py
CHANGED
@@ -196,7 +196,7 @@ def get_iso_format_timestamp():
|
|
196 |
return iso_format_timestamp, filename_friendly_timestamp
|
197 |
|
198 |
|
199 |
-
def submit_results(filepath: str, model: str, model_url: str, version: str = "AIR-Bench_24.04", is_anonymous=False):
|
200 |
if not filepath.endswith(".zip"):
|
201 |
return styled_error(f"file uploading aborted. wrong file type: {filepath}")
|
202 |
|
@@ -236,6 +236,8 @@ def submit_results(filepath: str, model: str, model_url: str, version: str = "AI
|
|
236 |
output_config = {
|
237 |
"model_name": f"{model}",
|
238 |
"model_url": f"{model_url}",
|
|
|
|
|
239 |
"version": f"{version}",
|
240 |
"is_anonymous": f"{is_anonymous}",
|
241 |
"revision": f"{revision}",
|
|
|
196 |
return iso_format_timestamp, filename_friendly_timestamp
|
197 |
|
198 |
|
199 |
+
def submit_results(filepath: str, model: str, model_url: str, reranker: str, reranker_url: str, version: str = "AIR-Bench_24.04", is_anonymous=False):
|
200 |
if not filepath.endswith(".zip"):
|
201 |
return styled_error(f"file uploading aborted. wrong file type: {filepath}")
|
202 |
|
|
|
236 |
output_config = {
|
237 |
"model_name": f"{model}",
|
238 |
"model_url": f"{model_url}",
|
239 |
+
"reranker_name": f"{reranker}",
|
240 |
+
"reranker_url": f"{reranker_url}",
|
241 |
"version": f"{version}",
|
242 |
"is_anonymous": f"{is_anonymous}",
|
243 |
"revision": f"{revision}",
|