Spaces:
Running
Running
added marked for relaxed
Browse files- __pycache__/about.cpython-310.pyc +0 -0
- about.py +3 -3
- app.py +8 -1
__pycache__/about.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/about.cpython-310.pyc and b/__pycache__/about.cpython-310.pyc differ
|
|
|
about.py
CHANGED
|
@@ -11,7 +11,7 @@ results_repo = f'{organization}/lemat-genbench-results'
|
|
| 11 |
|
| 12 |
# Column display names mapping
|
| 13 |
COLUMN_DISPLAY_NAMES = {
|
| 14 |
-
'
|
| 15 |
'n_structures': 'Total Structures',
|
| 16 |
# Validity metrics
|
| 17 |
'overall_valid_count': 'Valid',
|
|
@@ -139,7 +139,7 @@ COLUMN_TO_GROUP = get_column_to_group_mapping()
|
|
| 139 |
|
| 140 |
# Compact view columns (most important metrics visible without scrolling)
|
| 141 |
COMPACT_VIEW_COLUMNS = [
|
| 142 |
-
'
|
| 143 |
'overall_valid_count',
|
| 144 |
'unique_count',
|
| 145 |
'novel_count',
|
|
@@ -153,7 +153,7 @@ COMPACT_VIEW_COLUMNS = [
|
|
| 153 |
]
|
| 154 |
|
| 155 |
# Full view columns (all metrics organized by groups)
|
| 156 |
-
FULL_VIEW_COLUMNS = ['
|
| 157 |
for group_name, cols in METRIC_GROUPS.items():
|
| 158 |
FULL_VIEW_COLUMNS.extend(cols)
|
| 159 |
|
|
|
|
| 11 |
|
| 12 |
# Column display names mapping
|
| 13 |
COLUMN_DISPLAY_NAMES = {
|
| 14 |
+
'model_name': 'Model',
|
| 15 |
'n_structures': 'Total Structures',
|
| 16 |
# Validity metrics
|
| 17 |
'overall_valid_count': 'Valid',
|
|
|
|
| 139 |
|
| 140 |
# Compact view columns (most important metrics visible without scrolling)
|
| 141 |
COMPACT_VIEW_COLUMNS = [
|
| 142 |
+
'model_name',
|
| 143 |
'overall_valid_count',
|
| 144 |
'unique_count',
|
| 145 |
'novel_count',
|
|
|
|
| 153 |
]
|
| 154 |
|
| 155 |
# Full view columns (all metrics organized by groups)
|
| 156 |
+
FULL_VIEW_COLUMNS = ['model_name', 'n_structures']
|
| 157 |
for group_name, cols in METRIC_GROUPS.items():
|
| 158 |
FULL_VIEW_COLUMNS.extend(cols)
|
| 159 |
|
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def format_dataframe(df, show_percentage=False, selected_groups=None, compact_vi
|
|
| 30 |
return df
|
| 31 |
|
| 32 |
# Build column list based on view mode
|
| 33 |
-
selected_cols = ['
|
| 34 |
|
| 35 |
if compact_view:
|
| 36 |
# Use predefined compact columns
|
|
@@ -55,6 +55,13 @@ def format_dataframe(df, show_percentage=False, selected_groups=None, compact_vi
|
|
| 55 |
# Create a copy with selected columns
|
| 56 |
display_df = df[selected_cols].copy()
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Convert count-based metrics to percentages if requested
|
| 59 |
if show_percentage and 'n_structures' in df.columns:
|
| 60 |
n_structures = df['n_structures']
|
|
|
|
| 30 |
return df
|
| 31 |
|
| 32 |
# Build column list based on view mode
|
| 33 |
+
selected_cols = ['model_name']
|
| 34 |
|
| 35 |
if compact_view:
|
| 36 |
# Use predefined compact columns
|
|
|
|
| 55 |
# Create a copy with selected columns
|
| 56 |
display_df = df[selected_cols].copy()
|
| 57 |
|
| 58 |
+
# Add relaxed symbol to model name if relaxed column is True
|
| 59 |
+
if 'relaxed' in df.columns and 'model_name' in display_df.columns:
|
| 60 |
+
display_df['model_name'] = df.apply(
|
| 61 |
+
lambda row: f"{row['model_name']} ⚡" if row.get('relaxed', False) else row['model_name'],
|
| 62 |
+
axis=1
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
# Convert count-based metrics to percentages if requested
|
| 66 |
if show_percentage and 'n_structures' in df.columns:
|
| 67 |
n_structures = df['n_structures']
|