cgeorgiaw HF Staff commited on
Commit
6e39e11
·
1 Parent(s): 2484fe9

small reorg

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -104,6 +104,20 @@ def format_dataframe(df, show_percentage=False, selected_groups=None, compact_vi
104
 
105
  display_df['model_name'] = df.apply(add_model_symbols, axis=1)
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  # Convert count-based metrics to percentages if requested
108
  if show_percentage and 'n_structures' in df.columns:
109
  n_structures = df['n_structures']
@@ -353,6 +367,7 @@ Generative machine learning models hold great promise for accelerating materials
353
  value="Descending",
354
  label="Sort Direction"
355
  )
 
356
  training_set_filter = gr.Dropdown(
357
  choices=["All"] + TRAINING_DATASETS,
358
  value="All",
 
104
 
105
  display_df['model_name'] = df.apply(add_model_symbols, axis=1)
106
 
107
+ # Format training_set column for clean display
108
+ if 'training_set' in display_df.columns:
109
+ def format_training_set(val):
110
+ if val is None or (isinstance(val, float) and np.isnan(val)):
111
+ return ''
112
+ val = str(val).strip()
113
+ if val in ('[]', '', 'nan', 'None'):
114
+ return ''
115
+ # Strip brackets and quotes for list-like strings
116
+ val = val.strip('[]')
117
+ val = val.replace("'", "").replace('"', '')
118
+ return val
119
+ display_df['training_set'] = display_df['training_set'].apply(format_training_set)
120
+
121
  # Convert count-based metrics to percentages if requested
122
  if show_percentage and 'n_structures' in df.columns:
123
  n_structures = df['n_structures']
 
367
  value="Descending",
368
  label="Sort Direction"
369
  )
370
+ with gr.Column(scale=1):
371
  training_set_filter = gr.Dropdown(
372
  choices=["All"] + TRAINING_DATASETS,
373
  value="All",