Amna2024 commited on
Commit
5b6144a
·
verified ·
1 Parent(s): 9e92bf9

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -10
main.py CHANGED
@@ -14,22 +14,20 @@ userdata = {
14
  GEMINI_KEY = userdata.get("GEMINI_API_KEY")
15
 
16
 
17
- import sqlite3
18
 
19
- DATABASE_PATH = "/app/RAG/chroma.sqlite3"
20
 
21
- try:
22
- conn = sqlite3.connect(DATABASE_PATH, check_same_thread=False)
23
- print("Database connection successful!")
24
- except sqlite3.OperationalError as e:
25
- print(f"Database connection failed: {e}")
26
 
27
 
28
 
29
 
30
- PERSIST_DIR = os.path.dirname(os.path.abspath(__file__))
31
- #DATABASE_PATH = "/app/RAG/chroma.sqlite3"
32
- #os.path.join(PROJECT_ROOT, 'RAG/') # Make this configurable if needed
33
  v_store = load_vector_store(GEMINI_KEY, PERSIST_DIR)
34
  retriever = Retriever(v_store)
35
  gemini_llm = GeminiLLM(GEMINI_KEY)
 
14
  GEMINI_KEY = userdata.get("GEMINI_API_KEY")
15
 
16
 
17
+ # import sqlite3
18
 
19
+ # DATABASE_PATH = "/app/RAG/chroma.sqlite3"
20
 
21
+ # try:
22
+ # conn = sqlite3.connect(DATABASE_PATH, check_same_thread=False)
23
+ # print("Database connection successful!")
24
+ # except sqlite3.OperationalError as e:
25
+ # print(f"Database connection failed: {e}")
26
 
27
 
28
 
29
 
30
+ PERSIST_DIR = "/app/RAG/chroma_db"
 
 
31
  v_store = load_vector_store(GEMINI_KEY, PERSIST_DIR)
32
  retriever = Retriever(v_store)
33
  gemini_llm = GeminiLLM(GEMINI_KEY)