Rulga commited on
Commit
30f3c9d
·
1 Parent(s): 6b5c2b1

Refactor evaluation interface in app.py: Enhance layout and improve visibility of status and report sections

Browse files
Files changed (1) hide show
  1. app.py +25 -18
app.py CHANGED
@@ -1113,31 +1113,38 @@ with gr.Blocks(css="""
1113
  gr.Markdown("### Evaluation of Chat Responses")
1114
 
1115
  with gr.Row():
1116
- with gr.Column(scale=1): # Changed to full width
1117
- # Status and reports section
1118
- with gr.Row():
1119
- with gr.Column(scale=1):
1120
- evaluation_status = gr.Textbox(label="Evaluation Status", interactive=False)
1121
- refresh_status_btn = gr.Button("Refresh Status")
1122
-
1123
- with gr.Column(scale=1):
1124
- evaluation_report = gr.HTML(label="Evaluation Report")
1125
- refresh_report_btn = gr.Button("Generate Report")
1126
 
1127
- # Move refresh status below
1128
  refresh_data_status = gr.Textbox(
1129
- label="Refresh Status",
1130
  interactive=False,
1131
- visible=True
1132
  )
1133
 
1134
- # QA pairs table section - now full width
1135
- show_evaluated = gr.Checkbox(label="Show Already Evaluated Pairs", value=False)
1136
- qa_table = gr.DataFrame(
1137
- pd.DataFrame(columns=["Conversation ID", "Question", "Timestamp", "Evaluated"]),
 
 
 
 
 
 
 
 
1138
  interactive=True,
1139
  wrap=True,
1140
- elem_classes="table-container"
 
1141
  )
1142
 
1143
  # Conversation selection section
 
1113
  gr.Markdown("### Evaluation of Chat Responses")
1114
 
1115
  with gr.Row():
1116
+ with gr.Column(scale=1):
1117
+ # Status section
1118
+ evaluation_status = gr.Textbox(
1119
+ label="Evaluation Status",
1120
+ interactive=False,
1121
+ show_label=True
1122
+ )
1123
+ refresh_status_btn = gr.Button("Refresh Status")
 
 
1124
 
1125
+ # Moved refresh status and evaluation report here
1126
  refresh_data_status = gr.Textbox(
1127
+ label="Refresh Status",
1128
  interactive=False,
1129
+ show_label=True
1130
  )
1131
 
1132
+ evaluation_report = gr.HTML(label="Evaluation Report")
1133
+ refresh_report_btn = gr.Button("Generate Report")
1134
+
1135
+ # QA pairs table section
1136
+ show_evaluated = gr.Checkbox(
1137
+ label="Show Already Evaluated Pairs",
1138
+ value=False
1139
+ )
1140
+ qa_table = gr.Dataframe(
1141
+ value=pd.DataFrame(
1142
+ columns=["Conversation ID", "Question", "Timestamp", "Evaluated"]
1143
+ ),
1144
  interactive=True,
1145
  wrap=True,
1146
+ height=400,
1147
+ show_label=True
1148
  )
1149
 
1150
  # Conversation selection section