lisabdunlap commited on
Commit
6dbefd6
·
verified ·
1 Parent(s): d103f34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -30
app.py CHANGED
@@ -11,31 +11,9 @@ def list_saved_results():
11
  result_files = [f for f in os.listdir(results_dir) if f.endswith(".pkl")]
12
  # Sort by modification time (newest first)
13
  result_files.sort(key=lambda x: os.path.getmtime(os.path.join(results_dir, x)), reverse=True)
14
-
15
- # Format the filenames for display
16
  formatted_results = []
17
  for filename in result_files:
18
- # Extract date from filename
19
- parts = filename.split("_")
20
- if len(parts) >= 2:
21
- # Try to make the filename more readable
22
- try:
23
- # Assuming format is model1_vs_model2_dataset_YYYYMMDD_HHMMSS.pkl
24
- models_part = "_".join(parts[:-2]) # Everything except timestamp
25
- date_part = parts[-2]
26
- time_part = parts[-1].replace(".pkl", "")
27
-
28
- # Format date for display
29
- date_str = f"{date_part[:4]}-{date_part[4:6]}-{date_part[6:]}"
30
- time_str = f"{time_part[:2]}:{time_part[2:4]}:{time_part[4:]}"
31
-
32
- display_name = f"{models_part} ({date_str} {time_str})"
33
- formatted_results.append((display_name, filename))
34
- except:
35
- # If parsing fails, just use the filename
36
- formatted_results.append((filename, filename))
37
- else:
38
- formatted_results.append((filename, filename))
39
 
40
  return formatted_results
41
 
@@ -168,10 +146,10 @@ def create_vibecheck_results_ui():
168
 
169
  with gr.Blocks(theme='davehornik/Tealy', css=custom_css) as demo:
170
  gr.HTML("""
171
- <div class="header-text">
172
- <h1><span class="header-emoji">✨</span> VibeCheck Results Viewer <span class="header-emoji">✨</span></h1>
173
- <p>Explore previously saved VibeCheck analysis results</p>
174
- </div>
175
  """)
176
 
177
  gr.HTML("""
@@ -295,7 +273,6 @@ def create_vibecheck_results_ui():
295
  # Summarize
296
  summary_text = (
297
  "## Loaded VibeCheck Results\n"
298
- + f"Wandb Run URL: {results.get('wandb_run_url', 'N/A')}\n\n"
299
  + model_info
300
  + f"**Found {len(results['vibe_df']['vibe'].unique())} vibe(s)**\n"
301
  + "\n".join(
@@ -347,8 +324,7 @@ def create_vibecheck_results_ui():
347
  # Add a footer
348
  gr.HTML("""
349
  <div class="footer">
350
- <p>VibeCheck Results Viewer</p>
351
- <p>© 2023 VibeCheck Team</p>
352
  </div>
353
  """)
354
 
 
11
  result_files = [f for f in os.listdir(results_dir) if f.endswith(".pkl")]
12
  # Sort by modification time (newest first)
13
  result_files.sort(key=lambda x: os.path.getmtime(os.path.join(results_dir, x)), reverse=True)
 
 
14
  formatted_results = []
15
  for filename in result_files:
16
+ formatted_results.append((filename, filename))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  return formatted_results
19
 
 
146
 
147
  with gr.Blocks(theme='davehornik/Tealy', css=custom_css) as demo:
148
  gr.HTML("""
149
+ <div class="header-text">
150
+ <h1><span class="header-emoji">✨</span> LLM VibeChecks <span class="header-emoji">✨</span></h1>
151
+ <p>Visualize the Vibes of model pairs using <a href="https://arxiv.org/abs/2410.12851" target="_blank" style="text-decoration: underline; color: inherit;">VibeCheck system</a> (more to come)</p>
152
+ </div>
153
  """)
154
 
155
  gr.HTML("""
 
273
  # Summarize
274
  summary_text = (
275
  "## Loaded VibeCheck Results\n"
 
276
  + model_info
277
  + f"**Found {len(results['vibe_df']['vibe'].unique())} vibe(s)**\n"
278
  + "\n".join(
 
324
  # Add a footer
325
  gr.HTML("""
326
  <div class="footer">
327
+ <p just some folks who like vibes</p>
 
328
  </div>
329
  """)
330