Spaces:
Running
Running
Update app.py
Browse files
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))
|