ManailFatima commited on
Commit
259a6cb
·
verified ·
1 Parent(s): ceacbdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -37,6 +37,9 @@ load_dotenv()
37
 
38
  Pinecone_API_KEY = os.getenv("Pinecone_API_KEY")
39
  os.environ["PINECONE_API_KEY"] = Pinecone_API_KEY
 
 
 
40
 
41
  embeddings = download_embeddings()
42
 
 
37
 
38
  Pinecone_API_KEY = os.getenv("Pinecone_API_KEY")
39
  os.environ["PINECONE_API_KEY"] = Pinecone_API_KEY
40
+ if not PINECONE_API_KEY:
41
+ raise ValueError("Missing Pinecone API key. Set it in Hugging Face secrets.")
42
+
43
 
44
  embeddings = download_embeddings()
45