codegood commited on
Commit
6abcc26
·
1 Parent(s): fa23305

changed according to spaces

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 environment variables or provide config.yaml")
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)