Spaces:
Sleeping
Sleeping
changed according to spaces
Browse files
app.py
CHANGED
|
@@ -36,10 +36,10 @@ def init_resources():
|
|
| 36 |
embedding_model_name = embedding_model_name or config.get("embedding_model", "sentence-transformers/all-MiniLM-L6-v2")
|
| 37 |
system_prompt = system_prompt or config.get("system_prompt", "You are a helpful assistant.")
|
| 38 |
else:
|
| 39 |
-
raise ValueError("Please set SAMBANOVA_API_KEY and WEBSITE
|
| 40 |
|
| 41 |
if not llm_api_key or not website:
|
| 42 |
-
raise ValueError("SAMBANOVA_API_KEY and WEBSITE are required")
|
| 43 |
|
| 44 |
embed_model = HuggingFaceEmbeddings(model_name=embedding_model_name)
|
| 45 |
corpus = build_rag_corpus({"embedding_model": embedding_model_name}, embed_model, website)
|
|
|
|
| 36 |
embedding_model_name = embedding_model_name or config.get("embedding_model", "sentence-transformers/all-MiniLM-L6-v2")
|
| 37 |
system_prompt = system_prompt or config.get("system_prompt", "You are a helpful assistant.")
|
| 38 |
else:
|
| 39 |
+
raise ValueError("Please set SAMBANOVA_API_KEY and WEBSITE as secrets in your Hugging Face Space settings, or provide config.yaml for local development")
|
| 40 |
|
| 41 |
if not llm_api_key or not website:
|
| 42 |
+
raise ValueError("SAMBANOVA_API_KEY and WEBSITE are required. Set them as secrets in Hugging Face Space settings.")
|
| 43 |
|
| 44 |
embed_model = HuggingFaceEmbeddings(model_name=embedding_model_name)
|
| 45 |
corpus = build_rag_corpus({"embedding_model": embedding_model_name}, embed_model, website)
|