Spaces:
Running

maxidl commited on
Commit
afcfe31
·
verified ·
1 Parent(s): 4c98f85

SOOFI models: one colour (#FF00EB) via a display-name regex

Browse files
Files changed (2) hide show
  1. config.yaml +4 -7
  2. index.html +6 -0
config.yaml CHANGED
@@ -10,9 +10,10 @@ oellm_model_patterns:
10
  - "^OELLM"
11
  - "^Nucleus"
12
 
13
- # Model color overrides
14
- # Maps model_display_name patterns to hex colors.
15
- # Exact matches are checked first, then prefix matches.
 
16
  model_colors:
17
  # Qwen models
18
  "Qwen3 1.7B": "#9575CD"
@@ -84,10 +85,6 @@ model_colors:
84
  "ALIA 40B": "#000000"
85
  "Salamandra 7B": "#000000"
86
 
87
- # SOOFI
88
- "SOOFI Nano": "#5B1EFB"
89
- "SOOFI Nano _4": "#5B1EFB"
90
-
91
  # DeepSeek
92
  "DeepSeek V3": "#4D6BFF"
93
  "DeepSeek V3.1": "#4D6BFF"
 
10
  - "^OELLM"
11
  - "^Nucleus"
12
 
13
+ # Model colors: exact model_display_name matches first, then the regexes in model_color_patterns
14
+ model_color_patterns:
15
+ "^SOOFI": "#FF00EB"
16
+
17
  model_colors:
18
  # Qwen models
19
  "Qwen3 1.7B": "#9575CD"
 
85
  "ALIA 40B": "#000000"
86
  "Salamandra 7B": "#000000"
87
 
 
 
 
 
88
  # DeepSeek
89
  "DeepSeek V3": "#4D6BFF"
90
  "DeepSeek V3.1": "#4D6BFF"
index.html CHANGED
@@ -958,10 +958,16 @@
958
  const configColors = CONFIG.model_colors || {};
959
  MODEL_COLORS = {};
960
  let paletteIdx = 0;
 
 
 
961
  ALL_MODELS.forEach(m => {
962
  const name = m.model_display_name;
 
963
  if (configColors[name]) {
964
  MODEL_COLORS[name] = configColors[name];
 
 
965
  } else {
966
  MODEL_COLORS[name] = COLOR_PALETTE[paletteIdx % COLOR_PALETTE.length];
967
  paletteIdx++;
 
958
  const configColors = CONFIG.model_colors || {};
959
  MODEL_COLORS = {};
960
  let paletteIdx = 0;
961
+ const colorPatterns = Object.entries(CONFIG.model_color_patterns || {}).flatMap(([p, c]) => {
962
+ try { return [[new RegExp(p), c]]; } catch (e) { return []; }
963
+ });
964
  ALL_MODELS.forEach(m => {
965
  const name = m.model_display_name;
966
+ const pattern = colorPatterns.find(([re]) => re.test(name || ''));
967
  if (configColors[name]) {
968
  MODEL_COLORS[name] = configColors[name];
969
+ } else if (pattern) {
970
+ MODEL_COLORS[name] = pattern[1];
971
  } else {
972
  MODEL_COLORS[name] = COLOR_PALETTE[paletteIdx % COLOR_PALETTE.length];
973
  paletteIdx++;