Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -374,8 +374,11 @@ def main():
|
|
| 374 |
st.warning("Please enter your Anthropic API Key in the sidebar to continue.")
|
| 375 |
return
|
| 376 |
|
| 377 |
-
#
|
| 378 |
-
|
|
|
|
|
|
|
|
|
|
| 379 |
|
| 380 |
# Initialize database with synthetic data
|
| 381 |
if "db" not in st.session_state:
|
|
|
|
| 374 |
st.warning("Please enter your Anthropic API Key in the sidebar to continue.")
|
| 375 |
return
|
| 376 |
|
| 377 |
+
# Set the API key as an environment variable
|
| 378 |
+
os.environ["ANTHROPIC_API_KEY"] = api_key
|
| 379 |
+
|
| 380 |
+
# Initialize Anthropic client using default settings
|
| 381 |
+
anthropic_client = Anthropic() # Uses API key from environment variable
|
| 382 |
|
| 383 |
# Initialize database with synthetic data
|
| 384 |
if "db" not in st.session_state:
|