chrissoria commited on
Commit
44c7650
·
1 Parent(s): 91f96dd

Add Claude 3.5 Haiku to free models

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -26,6 +26,7 @@ FREE_MODEL_CHOICES = [
26
  "gemini-2.5-flash",
27
  "gpt-4o",
28
  "mistral-large-latest",
 
29
  ]
30
 
31
  # Paid models (user provides their own API key)
@@ -122,6 +123,10 @@ def classify_data(spreadsheet_file, spreadsheet_column,
122
  actual_api_key = os.environ.get("MISTRAL_API_KEY", "")
123
  if not actual_api_key:
124
  return None, None, "**Error:** Mistral API key not configured in Space secrets"
 
 
 
 
125
  else:
126
  actual_api_key = os.environ.get("HF_API_KEY", "")
127
  else:
 
26
  "gemini-2.5-flash",
27
  "gpt-4o",
28
  "mistral-large-latest",
29
+ "claude-3-5-haiku-20241022",
30
  ]
31
 
32
  # Paid models (user provides their own API key)
 
123
  actual_api_key = os.environ.get("MISTRAL_API_KEY", "")
124
  if not actual_api_key:
125
  return None, None, "**Error:** Mistral API key not configured in Space secrets"
126
+ elif "claude" in model.lower():
127
+ actual_api_key = os.environ.get("ANTHROPIC_API_KEY", "")
128
+ if not actual_api_key:
129
+ return None, None, "**Error:** Anthropic API key not configured in Space secrets"
130
  else:
131
  actual_api_key = os.environ.get("HF_API_KEY", "")
132
  else: