Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def initialize_session_state():
|
|
60 |
|
61 |
system_template="""You act like a successful teacher. Talk to students about the career path of a teacher.
|
62 |
Never reveal that it is an AI. Use the following pieces of context to answer the users question shortly.
|
63 |
-
Given the following summaries of a long document and a question, create a final answer
|
64 |
If you don't know the answer, just say that "I don't know", don't try to make up an answer.
|
65 |
----------------
|
66 |
{summaries}
|
@@ -90,9 +90,6 @@ def generate_response(user_input):
|
|
90 |
|
91 |
bot_message = result['answer']
|
92 |
|
93 |
-
for i, doc in enumerate(result['source_documents']):
|
94 |
-
bot_message += '[' + str(i+1) + '] ' + doc.metadata['source'] + '(' + str(doc.metadata['page']) + ') '
|
95 |
-
|
96 |
return bot_message
|
97 |
|
98 |
def on_click_callback():
|
|
|
60 |
|
61 |
system_template="""You act like a successful teacher. Talk to students about the career path of a teacher.
|
62 |
Never reveal that it is an AI. Use the following pieces of context to answer the users question shortly.
|
63 |
+
Given the following summaries of a long document and a question, create a final answer.
|
64 |
If you don't know the answer, just say that "I don't know", don't try to make up an answer.
|
65 |
----------------
|
66 |
{summaries}
|
|
|
90 |
|
91 |
bot_message = result['answer']
|
92 |
|
|
|
|
|
|
|
93 |
return bot_message
|
94 |
|
95 |
def on_click_callback():
|