Pablo276 commited on
Commit
8cf8b6a
·
verified ·
1 Parent(s): 80c4d6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,10 +21,11 @@ load_dotenv()
21
  def get_stored_files():
22
  """Retrieve a list of files currently stored in the Pinecone index using the pinecone library."""
23
  try:
24
- pc = Pinecone(api_key=os.environ.get("PINECONE_API_KEY"))
 
25
  index_name = os.environ.get("PINECONE_INDEX_NAME")
26
 
27
- print(PINECONE_API_KEY, PINECONE_INDEX_NAME)
28
  # Check if the index exists. If not, there are no files.
29
  if index_name not in [index_info["name"] for index_info in pc.list_indexes()]:
30
  return []
 
21
  def get_stored_files():
22
  """Retrieve a list of files currently stored in the Pinecone index using the pinecone library."""
23
  try:
24
+ PINECONE_API_KEY = os.environ.get("PINECONE_API_KEY")
25
+ pc = Pinecone(api_key=PINECONE_API_KEY)
26
  index_name = os.environ.get("PINECONE_INDEX_NAME")
27
 
28
+ print(PINECONE_API_KEY, index_name)
29
  # Check if the index exists. If not, there are no files.
30
  if index_name not in [index_info["name"] for index_info in pc.list_indexes()]:
31
  return []