Commit
·
09df82b
1
Parent(s):
ec99498
update
Browse files
main.py
CHANGED
@@ -107,34 +107,35 @@ def process_json(file):
|
|
107 |
# title="Automated Evaluation of MixBench",
|
108 |
# description="Upload a prediction JSON to evaluate Recall@1, NDCG@10, and NDCG@100 against encrypted qrels.\n\nExample input:\n" + example_json
|
109 |
# ).launch(share=True)
|
110 |
-
|
111 |
def main_gradio():
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
|
131 |
gr.Interface(
|
132 |
fn=process_json,
|
133 |
inputs=gr.File(label="Upload Retrieval Result (JSON)"),
|
134 |
outputs=gr.Textbox(label="Results"),
|
135 |
title="Automated Evaluation of MixBench",
|
136 |
-
description=
|
137 |
-
|
|
|
|
|
138 |
).launch(share=True)
|
139 |
|
140 |
if __name__ == "__main__":
|
|
|
107 |
# title="Automated Evaluation of MixBench",
|
108 |
# description="Upload a prediction JSON to evaluate Recall@1, NDCG@10, and NDCG@100 against encrypted qrels.\n\nExample input:\n" + example_json
|
109 |
# ).launch(share=True)
|
|
|
110 |
def main_gradio():
|
111 |
+
example_json_html = (
|
112 |
+
'{<br>'
|
113 |
+
' "Google_WIT": [<br>'
|
114 |
+
' {"query_id": "1", "corpus_top_100_list": "5, 2, 8, ..."},<br>'
|
115 |
+
' {"query_id": "2", "corpus_top_100_list": "90, 13, 3, ..."}<br>'
|
116 |
+
' ],<br>'
|
117 |
+
' "MSCOCO": [<br>'
|
118 |
+
' {"query_id": "3", "corpus_top_100_list": "122, 35, 22, ..."},<br>'
|
119 |
+
' {"query_id": "2", "corpus_top_100_list": "90, 19, 3, ..."}<br>'
|
120 |
+
' ],<br>'
|
121 |
+
' "OVEN": [<br>'
|
122 |
+
' {"query_id": "3", "corpus_top_100_list": "11, 15, 22, ..."}<br>'
|
123 |
+
' ],<br>'
|
124 |
+
' "VisualNews": [<br>'
|
125 |
+
' {"query_id": "3", "corpus_top_100_list": "101, 35, 22, ..."}<br>'
|
126 |
+
' ]<br>'
|
127 |
+
'}'
|
128 |
+
)
|
129 |
|
130 |
gr.Interface(
|
131 |
fn=process_json,
|
132 |
inputs=gr.File(label="Upload Retrieval Result (JSON)"),
|
133 |
outputs=gr.Textbox(label="Results"),
|
134 |
title="Automated Evaluation of MixBench",
|
135 |
+
description=(
|
136 |
+
"Upload a prediction JSON to evaluate Recall@1, NDCG@10, and NDCG@100 against encrypted qrels.<br><br>"
|
137 |
+
"Example input format:<br><br>" + example_json_html
|
138 |
+
)
|
139 |
).launch(share=True)
|
140 |
|
141 |
if __name__ == "__main__":
|