Aivis commited on
Commit
c41e1fe
·
verified ·
1 Parent(s): c083776

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -57,7 +57,12 @@ def process_csv(file, calculate_openai, openai_model, calculate_anthropic, anthr
57
 
58
  # Initialize the Anthropic client
59
  #client = anthropic.Anthropic(api_key=anthropic_api_key)
60
- client = anthropic.Anthropic()
 
 
 
 
 
61
 
62
  token_counts_anthropic = {}
63
  total_tokens_anthropic = client.count_tokens(df.to_csv(index=False))
 
57
 
58
  # Initialize the Anthropic client
59
  #client = anthropic.Anthropic(api_key=anthropic_api_key)
60
+ #client = anthropic.Anthropic()
61
+ try:
62
+ client = anthropic.Anthropic()
63
+ print("Anthropic client initialized successfully")
64
+ except Exception as e:
65
+ return f"Error initializing Anthropic client: {e}"
66
 
67
  token_counts_anthropic = {}
68
  total_tokens_anthropic = client.count_tokens(df.to_csv(index=False))