yungewww commited on
Commit
ecc7153
·
verified ·
1 Parent(s): 93b4a6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -29,7 +29,7 @@ system_prompt = ChatPromptTemplate.from_messages([
29
  vectorstore = Chroma(
30
  collection_name = "example_collection",
31
  embedding_function = OpenAIEmbeddings(),
32
- persist_directory = "./chroma_langchain_db", # Where to save data locally, remove if not neccesary
33
  )
34
 
35
  def read_url(url):
@@ -80,9 +80,8 @@ def greet(prompt, file, url):
80
  file_splits = read_file(file)
81
  all_splits = file_splits
82
  else:
83
- file_splits = read_file(file)
84
  url_splits = read_url(url)
85
- all_splits = file_splits + url_splits
86
 
87
  vectorstore.add_documents(documents = all_splits)
88
 
 
29
  vectorstore = Chroma(
30
  collection_name = "example_collection",
31
  embedding_function = OpenAIEmbeddings(),
32
+ # persist_directory = "./chroma_langchain_db", # Where to save data locally, remove if not neccesary
33
  )
34
 
35
  def read_url(url):
 
80
  file_splits = read_file(file)
81
  all_splits = file_splits
82
  else:
 
83
  url_splits = read_url(url)
84
+ all_splits = url_splits
85
 
86
  vectorstore.add_documents(documents = all_splits)
87