Spaces:
Running
Running
Refactor evaluation interface in app.py: Enhance layout and improve visibility of status and report sections
Browse files
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):
|
| 1117 |
-
# Status
|
| 1118 |
-
|
| 1119 |
-
|
| 1120 |
-
|
| 1121 |
-
|
| 1122 |
-
|
| 1123 |
-
|
| 1124 |
-
evaluation_report = gr.HTML(label="Evaluation Report")
|
| 1125 |
-
refresh_report_btn = gr.Button("Generate Report")
|
| 1126 |
|
| 1127 |
-
#
|
| 1128 |
refresh_data_status = gr.Textbox(
|
| 1129 |
-
label="Refresh Status",
|
| 1130 |
interactive=False,
|
| 1131 |
-
|
| 1132 |
)
|
| 1133 |
|
| 1134 |
-
|
| 1135 |
-
|
| 1136 |
-
|
| 1137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1138 |
interactive=True,
|
| 1139 |
wrap=True,
|
| 1140 |
-
|
|
|
|
| 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
|