test
Browse files
app.py
CHANGED
|
@@ -223,7 +223,12 @@ def show_predictions_tab(model_list, dataset_list, predictions):
|
|
| 223 |
|
| 224 |
def get_pre_df(predictions, model_name, dataset_name):
|
| 225 |
this_predictions = predictions[dataset_name][model_name]['predictions']
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
this_predictions = pd.DataFrame(this_predictions)
|
|
|
|
| 227 |
return this_predictions
|
| 228 |
|
| 229 |
model_list = [i['abbr'] for i in model_list]
|
|
@@ -251,7 +256,16 @@ def show_predictions_tab(model_list, dataset_list, predictions):
|
|
| 251 |
column_widths=calculate_column_widths(initial_predictions),
|
| 252 |
)
|
| 253 |
|
| 254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
|
| 256 |
|
| 257 |
def create_interface():
|
|
|
|
| 223 |
|
| 224 |
def get_pre_df(predictions, model_name, dataset_name):
|
| 225 |
this_predictions = predictions[dataset_name][model_name]['predictions']
|
| 226 |
+
breakpoint()
|
| 227 |
+
for i in range(len(this_predictions)):
|
| 228 |
+
this_predictions[i]['origin_prompt'] = str(this_predictions[i]['origin_prompt'])
|
| 229 |
+
this_predictions[i]['gold'] = str(this_predictions[i]['gold'])
|
| 230 |
this_predictions = pd.DataFrame(this_predictions)
|
| 231 |
+
|
| 232 |
return this_predictions
|
| 233 |
|
| 234 |
model_list = [i['abbr'] for i in model_list]
|
|
|
|
| 256 |
column_widths=calculate_column_widths(initial_predictions),
|
| 257 |
)
|
| 258 |
|
| 259 |
+
with gr.Row():
|
| 260 |
+
with gr.Accordion("Citation", open=False):
|
| 261 |
+
citation_button = gr.Textbox(
|
| 262 |
+
value=CITATION_BUTTON_TEXT,
|
| 263 |
+
label=CITATION_BUTTON_LABEL,
|
| 264 |
+
elem_id='citation-button',
|
| 265 |
+
lines=6, # 增加行数
|
| 266 |
+
max_lines=8, # 设置最大行数
|
| 267 |
+
show_copy_button=True # 添加复制按钮使其更方便使用
|
| 268 |
+
)
|
| 269 |
|
| 270 |
|
| 271 |
def create_interface():
|