dembasowmr commited on
Commit
5db85ea
·
1 Parent(s): 6b2f911

Fix: ChromaDB SQLite version issue for Hugging Face deployment by moving pysqlite3 import to app.py. Refined doc indexing.

Browse files
Files changed (1) hide show
  1. src/compassia.py +2 -2
src/compassia.py CHANGED
@@ -2,7 +2,7 @@ import sys
2
  # IMPORTANT: These lines MUST be at the very top of compassia.py
3
  # They ensure that any subsequent import of 'sqlite3' (even indirectly by chromadb)
4
  # will use the version provided by pysqlite3-binary.
5
-
6
  try:
7
  import pysqlite3
8
  sys.modules['sqlite3'] = pysqlite3
@@ -10,7 +10,7 @@ except ImportError:
10
  # This should not happen in the Docker environment as pysqlite3-binary is in requirements.txt
11
  print("Warning: pysqlite3 not found. Falling back to default sqlite3. ChromaDB might fail if it's too old.")
12
  pass
13
-
14
  import requests
15
  import os
16
  import uuid
 
2
  # IMPORTANT: These lines MUST be at the very top of compassia.py
3
  # They ensure that any subsequent import of 'sqlite3' (even indirectly by chromadb)
4
  # will use the version provided by pysqlite3-binary.
5
+ """
6
  try:
7
  import pysqlite3
8
  sys.modules['sqlite3'] = pysqlite3
 
10
  # This should not happen in the Docker environment as pysqlite3-binary is in requirements.txt
11
  print("Warning: pysqlite3 not found. Falling back to default sqlite3. ChromaDB might fail if it's too old.")
12
  pass
13
+ """
14
  import requests
15
  import os
16
  import uuid