Spaces:
Sleeping
Sleeping
apahilaj
commited on
Commit
·
d57785a
1
Parent(s):
f02b693
renamed questino
Browse files
app.py
CHANGED
@@ -71,9 +71,9 @@ def load_db(file, k):
|
|
71 |
|
72 |
return qa
|
73 |
|
74 |
-
def greet(
|
75 |
a = load_db(pdf_file, 3)
|
76 |
-
r = a.invoke({"question":
|
77 |
match = re.search(r'Helpful Answer:(.*)', r['answer'])
|
78 |
if match:
|
79 |
helpful_answer = match.group(1).strip()
|
|
|
71 |
|
72 |
return qa
|
73 |
|
74 |
+
def greet(question, pdf_file):
|
75 |
a = load_db(pdf_file, 3)
|
76 |
+
r = a.invoke({"question": question, "chat_history": []})
|
77 |
match = re.search(r'Helpful Answer:(.*)', r['answer'])
|
78 |
if match:
|
79 |
helpful_answer = match.group(1).strip()
|