Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,11 @@ CITATION_BUTTON_TEXT = r"""@misc{2023opencompass,
|
|
15 |
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
|
16 |
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
head_style = """
|
19 |
<style>
|
20 |
@media (min-width: 1536px)
|
@@ -207,8 +212,20 @@ def show_results_tab(df):
|
|
207 |
outputs=table,
|
208 |
)
|
209 |
|
|
|
210 |
with gr.Row():
|
211 |
-
with gr.Accordion("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
citation_button = gr.Textbox(
|
213 |
value=CITATION_BUTTON_TEXT,
|
214 |
label=CITATION_BUTTON_LABEL,
|
@@ -302,9 +319,9 @@ def create_interface():
|
|
302 |
|
303 |
show_results_tab(df)
|
304 |
|
305 |
-
with gr.TabItem('Predictions', elem_id='notmain', id=1):
|
306 |
|
307 |
-
|
308 |
|
309 |
return demo
|
310 |
|
|
|
15 |
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
|
16 |
|
17 |
|
18 |
+
Predictions_BUTTON_LABEL = "All model predictions are listed here. Access this URL for more details."
|
19 |
+
|
20 |
+
Predictions_BUTTON_TEXT = "https://huggingface.co/datasets/opencompass/compass_academic_predictions"
|
21 |
+
|
22 |
+
|
23 |
head_style = """
|
24 |
<style>
|
25 |
@media (min-width: 1536px)
|
|
|
212 |
outputs=table,
|
213 |
)
|
214 |
|
215 |
+
|
216 |
with gr.Row():
|
217 |
+
with gr.Accordion("Storage of Model Predictions", open=True):
|
218 |
+
citation_button = gr.Textbox(
|
219 |
+
value=Predictions_BUTTON_TEXT,
|
220 |
+
label=Predictions_BUTTON_LABEL,
|
221 |
+
elem_id='predictions-button',
|
222 |
+
lines=2, # 增加行数
|
223 |
+
max_lines=4, # 设置最大行数
|
224 |
+
show_copy_button=True # 添加复制按钮使其更方便使用
|
225 |
+
)
|
226 |
+
|
227 |
+
with gr.Row():
|
228 |
+
with gr.Accordion("Citation", open=True):
|
229 |
citation_button = gr.Textbox(
|
230 |
value=CITATION_BUTTON_TEXT,
|
231 |
label=CITATION_BUTTON_LABEL,
|
|
|
319 |
|
320 |
show_results_tab(df)
|
321 |
|
322 |
+
# with gr.TabItem('Predictions', elem_id='notmain', id=1):
|
323 |
|
324 |
+
# show_predictions_tab(model_list, dataset_list, predictions)
|
325 |
|
326 |
return demo
|
327 |
|