Eric Xu commited on
Commit
93afd8d
·
unverified ·
1 Parent(s): dff6d17

Hide BYOK API key setup on HF Spaces — server key handles everything

Browse files
Files changed (1) hide show
  1. web/static/index.html +4 -2
web/static/index.html CHANGED
@@ -760,11 +760,13 @@ async function init() {
760
  if (cfg.has_api_key) {
761
  badge.textContent = cfg.model;
762
  badge.className = 'config-badge ok';
763
- document.getElementById('apiKeySetup').classList.add('hidden');
764
- } else {
765
  badge.textContent = 'No API key';
766
  badge.className = 'config-badge warn';
767
  document.getElementById('apiKeySetup').classList.remove('hidden');
 
 
 
768
  }
769
 
770
  const nemBadge = document.getElementById('nemotronBadge');
 
760
  if (cfg.has_api_key) {
761
  badge.textContent = cfg.model;
762
  badge.className = 'config-badge ok';
763
+ } else if (!cfg.is_spaces) {
 
764
  badge.textContent = 'No API key';
765
  badge.className = 'config-badge warn';
766
  document.getElementById('apiKeySetup').classList.remove('hidden');
767
+ } else {
768
+ badge.textContent = 'No API key configured';
769
+ badge.className = 'config-badge warn';
770
  }
771
 
772
  const nemBadge = document.getElementById('nemotronBadge');