vislupus commited on
Commit
ab572f0
1 Parent(s): 3e096bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -11,7 +11,10 @@ def rag_retriever(message, history, system_prompt, num_sources=4, temperature=0)
11
  chat = ChatGroq(temperature=temperature, model_name="llama3-70b-8192", api_key=os.getenv("GROQ_API_KEY"))
12
 
13
  embeddings = HuggingFaceEmbeddings(model_name="avsolatorio/GIST-large-Embedding-v0")
14
- store = Chroma(persist_directory="chroma.sqlite3", embedding_function=embeddings, collection_name='ai_act')
 
 
 
15
 
16
  prompt_template = ChatPromptTemplate.from_messages([
17
  ("system", system_prompt+"""
 
11
  chat = ChatGroq(temperature=temperature, model_name="llama3-70b-8192", api_key=os.getenv("GROQ_API_KEY"))
12
 
13
  embeddings = HuggingFaceEmbeddings(model_name="avsolatorio/GIST-large-Embedding-v0")
14
+
15
+ base_dir = os.path.dirname(os.path.abspath(__file__))
16
+ db_path = os.path.join(base_dir, 'chroma.sqlite3')
17
+ store = Chroma(persist_directory=db_path, embedding_function=embeddings, collection_name='ai_act')
18
 
19
  prompt_template = ChatPromptTemplate.from_messages([
20
  ("system", system_prompt+"""