Spaces:
Runtime error
Runtime error
jamescalam
commited on
Commit
•
5e28d4b
1
Parent(s):
a8c350c
Update app.py
Browse files
app.py
CHANGED
@@ -120,11 +120,11 @@ def answer_question(
|
|
120 |
print(e)
|
121 |
return ""
|
122 |
|
123 |
-
def search(index,
|
124 |
if query != "":
|
125 |
with st.spinner("Retrieving, please wait..."):
|
126 |
answer, sources = answer_question(
|
127 |
-
index,
|
128 |
question=query,
|
129 |
instruction=instructions[style],
|
130 |
top_k=top_k
|
@@ -253,7 +253,7 @@ if search.button("Go!") or query != "":
|
|
253 |
lib_meta = [lib.lower() for lib in lib_filters.keys() if lib_filters[lib]]
|
254 |
# ask the question
|
255 |
answer, sources = answer_question(
|
256 |
-
index,
|
257 |
question=query,
|
258 |
instruction=instructions[style.lower()],
|
259 |
top_k=top_k,
|
|
|
120 |
print(e)
|
121 |
return ""
|
122 |
|
123 |
+
def search(index, query, style, top_k, lib_filters):
|
124 |
if query != "":
|
125 |
with st.spinner("Retrieving, please wait..."):
|
126 |
answer, sources = answer_question(
|
127 |
+
index,
|
128 |
question=query,
|
129 |
instruction=instructions[style],
|
130 |
top_k=top_k
|
|
|
253 |
lib_meta = [lib.lower() for lib in lib_filters.keys() if lib_filters[lib]]
|
254 |
# ask the question
|
255 |
answer, sources = answer_question(
|
256 |
+
index,
|
257 |
question=query,
|
258 |
instruction=instructions[style.lower()],
|
259 |
top_k=top_k,
|