Spaces:
Build error
Build error
fix upload documents
Browse files- app.py +2 -2
- globalvars.py +1 -0
app.py
CHANGED
@@ -190,8 +190,8 @@ def upload_documents(files):
|
|
190 |
for file in files:
|
191 |
loader = UnstructuredFileLoader(file.name)
|
192 |
documents = loader.load()
|
193 |
-
add_documents_to_chroma(
|
194 |
-
return "Documents uploaded and processed successfully!"
|
195 |
|
196 |
def query_documents(query):
|
197 |
results = query_chroma(query)
|
|
|
190 |
for file in files:
|
191 |
loader = UnstructuredFileLoader(file.name)
|
192 |
documents = loader.load()
|
193 |
+
add_documents_to_chroma(documents, embedding_function)
|
194 |
+
return "Documents uploaded and processed successfully!"
|
195 |
|
196 |
def query_documents(query):
|
197 |
results = query_chroma(query)
|
globalvars.py
CHANGED
@@ -25,6 +25,7 @@ tasks = {
|
|
25 |
'NQ': 'Given a question, retrieve Wikipedia passages that answer the question',
|
26 |
'QuoraRetrieval': 'Given a question, retrieve questions that are semantically equivalent to the given question',
|
27 |
'SCIDOCS': 'Given a scientific paper title, retrieve paper abstracts that are cited by the given paper',
|
|
|
28 |
}
|
29 |
|
30 |
intention_prompt= """
|
|
|
25 |
'NQ': 'Given a question, retrieve Wikipedia passages that answer the question',
|
26 |
'QuoraRetrieval': 'Given a question, retrieve questions that are semantically equivalent to the given question',
|
27 |
'SCIDOCS': 'Given a scientific paper title, retrieve paper abstracts that are cited by the given paper',
|
28 |
+
'DEFAULT': 'Given a query, retrieve relevant entity descriptions from DBPedia',
|
29 |
}
|
30 |
|
31 |
intention_prompt= """
|