npuliga commited on
Commit
3e75d47
·
1 Parent(s): cd642cf

updated app

Browse files
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -143,10 +143,13 @@ def get_data_preview():
143
  if "data" not in DB:
144
  return {}, {}, {}, {}, {}
145
 
146
- df = DB["data"]
147
- # Remove failed_samples column if it exists
148
- if 'failed_samples' in df.columns:
149
- df = df.drop(columns=['failed_samples'])
 
 
 
150
 
151
  # Define explicit domain order matching the UI
152
  domain_order = ['pubmedqa', 'techqa', 'finqa', 'msmarco', 'cuad']
@@ -187,7 +190,7 @@ def get_data_preview():
187
  if col in domain_df.columns:
188
  ordered_cols.append(col)
189
 
190
- # Add any remaining columns
191
  remaining = [col for col in domain_df.columns if col not in ordered_cols]
192
  ordered_cols.extend(remaining)
193
 
@@ -469,17 +472,6 @@ with gr.Blocks(title="RAG Analytics Pro") as demo:
469
  with gr.TabItem("Data Preview"):
470
  gr.Markdown("### All Test Configurations by Domain")
471
 
472
- # Add column type legend
473
- gr.Markdown("""
474
- **Column Organization Guide:**
475
- - **Metadata** (Test ID, Config Purpose, Dataset Name) - Test identifiers
476
- - **Constants** - Same value across all tests in this domain (e.g., embedding model)
477
- - **Variables** - Experimental parameters that change across tests (e.g., chunk size, reranker)
478
- - **Results** - Performance metrics (RMSE Relevance, RMSE Utilization, RMSE Completeness, F1-Score, AUC-ROC)
479
-
480
- *Columns are automatically reordered: Metadata → Constants → Variables → Results*
481
- """)
482
-
483
  gr.Markdown("**Biomedical (PubMedQA)**")
484
  preview_table_1 = gr.Dataframe(interactive=False, wrap=True)
485
  gr.Markdown("**Customer Support (TechQA)**")
 
143
  if "data" not in DB:
144
  return {}, {}, {}, {}, {}
145
 
146
+ df = DB["data"].copy()
147
+
148
+ # Remove failed_samples related columns
149
+ columns_to_remove = ['failed_samples', '# Failed/Total Samples', 'failedsamples', '%_failed_sample']
150
+ for col in columns_to_remove:
151
+ if col in df.columns:
152
+ df = df.drop(columns=[col])
153
 
154
  # Define explicit domain order matching the UI
155
  domain_order = ['pubmedqa', 'techqa', 'finqa', 'msmarco', 'cuad']
 
190
  if col in domain_df.columns:
191
  ordered_cols.append(col)
192
 
193
+ # Add any remaining columns (excluding failed samples columns)
194
  remaining = [col for col in domain_df.columns if col not in ordered_cols]
195
  ordered_cols.extend(remaining)
196
 
 
472
  with gr.TabItem("Data Preview"):
473
  gr.Markdown("### All Test Configurations by Domain")
474
 
 
 
 
 
 
 
 
 
 
 
 
475
  gr.Markdown("**Biomedical (PubMedQA)**")
476
  preview_table_1 = gr.Dataframe(interactive=False, wrap=True)
477
  gr.Markdown("**Customer Support (TechQA)**")