chrissoria commited on
Commit
540f419
·
1 Parent(s): 06bbe2c

Add Grok-4 to free models, update Mistral to mistral-medium-2505

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -25,9 +25,10 @@ FREE_MODEL_CHOICES = [
25
  "meta-llama/Llama-4.1-8B-Instruct:novita",
26
  "gemini-2.5-flash",
27
  "gpt-4o",
28
- "mistral-medium-latest",
29
  "claude-3-haiku-20240307",
30
  "sonar",
 
31
  ]
32
 
33
  # Paid models (user provides their own API key)
@@ -135,6 +136,10 @@ def classify_data(spreadsheet_file, spreadsheet_column,
135
  actual_api_key = os.environ.get("PERPLEXITY_API_KEY", "")
136
  if not actual_api_key:
137
  return None, None, "**Error:** Perplexity API key not configured in Space secrets"
 
 
 
 
138
  else:
139
  actual_api_key = os.environ.get("HF_API_KEY", "")
140
  else:
 
25
  "meta-llama/Llama-4.1-8B-Instruct:novita",
26
  "gemini-2.5-flash",
27
  "gpt-4o",
28
+ "mistral-medium-2505",
29
  "claude-3-haiku-20240307",
30
  "sonar",
31
+ "grok-4-fast-non-reasoning",
32
  ]
33
 
34
  # Paid models (user provides their own API key)
 
136
  actual_api_key = os.environ.get("PERPLEXITY_API_KEY", "")
137
  if not actual_api_key:
138
  return None, None, "**Error:** Perplexity API key not configured in Space secrets"
139
+ elif "grok" in model.lower():
140
+ actual_api_key = os.environ.get("XAI_API_KEY", "")
141
+ if not actual_api_key:
142
+ return None, None, "**Error:** xAI API key not configured in Space secrets"
143
  else:
144
  actual_api_key = os.environ.get("HF_API_KEY", "")
145
  else: