LiamKhoaLe commited on
Commit
a8e02fb
·
1 Parent(s): ab68bb9

Fix syntax

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. memory.py +1 -1
app.py CHANGED
@@ -37,8 +37,8 @@ gemini_flash_api_key = os.getenv("FlashAPI")
37
  # Validate environment endpoint
38
  if not all([gemini_flash_api_key, mongo_uri, index_uri]):
39
  raise ValueError("❌ Missing API keys! Set them in Hugging Face Secrets.")
40
- logger.info(f"🔎 MongoDB URI: {mongo_uri}")
41
- logger.info(f"🔎 FAISS Index URI: {index_uri}")
42
 
43
  # ✅ Monitor Resources Before Startup
44
  import psutil
 
37
  # Validate environment endpoint
38
  if not all([gemini_flash_api_key, mongo_uri, index_uri]):
39
  raise ValueError("❌ Missing API keys! Set them in Hugging Face Secrets.")
40
+ # logger.info(f"🔎 MongoDB URI: {mongo_uri}")
41
+ # logger.info(f"🔎 FAISS Index URI: {index_uri}")
42
 
43
  # ✅ Monitor Resources Before Startup
44
  import psutil
memory.py CHANGED
@@ -32,7 +32,7 @@ class MemoryManager:
32
  if cache_key in self.chunk_cache:
33
  chunks = self.chunk_cache[cache_key]
34
  else:
35
- chunks = self._chunk_and_tag(response, lang)
36
  self.chunk_cache[cache_key] = chunks
37
  # Store chunks → faiss
38
  for chunk in chunks:
 
32
  if cache_key in self.chunk_cache:
33
  chunks = self.chunk_cache[cache_key]
34
  else:
35
+ chunks = self.chunk_response(response, lang)
36
  self.chunk_cache[cache_key] = chunks
37
  # Store chunks → faiss
38
  for chunk in chunks: