Spaces:
Sleeping
Sleeping
changing the api keys reading
Browse files
app.py
CHANGED
|
@@ -22,10 +22,10 @@ def init_resources():
|
|
| 22 |
return RESOURCE_STATE
|
| 23 |
|
| 24 |
# Try to load from environment variables first (for Spaces)
|
| 25 |
-
llm_api_key = os.
|
| 26 |
-
website = os.
|
| 27 |
-
embedding_model_name = os.
|
| 28 |
-
system_prompt = os.
|
| 29 |
|
| 30 |
# Fallback to config.yaml if env vars not set
|
| 31 |
if not llm_api_key or not website:
|
|
|
|
| 22 |
return RESOURCE_STATE
|
| 23 |
|
| 24 |
# Try to load from environment variables first (for Spaces)
|
| 25 |
+
llm_api_key = os.getenv("SAMBANOVA_API_KEY")
|
| 26 |
+
website = os.getenv("WEBSITE")
|
| 27 |
+
embedding_model_name = os.getenv("EMBEDDING_MODEL", "sentence-transformers/all-MiniLM-L6-v2")
|
| 28 |
+
system_prompt = os.getenv("SYSTEM_PROMPT", "You are a helpful assistant.")
|
| 29 |
|
| 30 |
# Fallback to config.yaml if env vars not set
|
| 31 |
if not llm_api_key or not website:
|