Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,22 +11,22 @@ from langchain.chains import ConversationalRetrievalChain
|
|
11 |
from langchain import PromptTemplate
|
12 |
|
13 |
|
14 |
-
_template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.
|
15 |
-
Chat History:
|
16 |
-
{chat_history}
|
17 |
-
Follow Up Input: {question}
|
18 |
-
Standalone question:"""
|
19 |
-
|
20 |
-
CONDENSE_QUESTION_PROMPT = PromptTemplate.from_template(_template)
|
21 |
-
|
22 |
-
template = """
|
23 |
-
You are given the following extracted parts of a long document and a question. Provide a short structured answer.
|
24 |
-
If you don't know the answer, look on the web. Don't try to make up an answer.
|
25 |
-
Question: {question}
|
26 |
-
=========
|
27 |
-
{context}
|
28 |
-
=========
|
29 |
-
Answer in Markdown:"""
|
30 |
|
31 |
def loading_pdf():
|
32 |
return "Loading..."
|
|
|
11 |
from langchain import PromptTemplate
|
12 |
|
13 |
|
14 |
+
# _template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.
|
15 |
+
# Chat History:
|
16 |
+
# {chat_history}
|
17 |
+
# Follow Up Input: {question}
|
18 |
+
# Standalone question:"""
|
19 |
+
|
20 |
+
# CONDENSE_QUESTION_PROMPT = PromptTemplate.from_template(_template)
|
21 |
+
|
22 |
+
# template = """
|
23 |
+
# You are given the following extracted parts of a long document and a question. Provide a short structured answer.
|
24 |
+
# If you don't know the answer, look on the web. Don't try to make up an answer.
|
25 |
+
# Question: {question}
|
26 |
+
# =========
|
27 |
+
# {context}
|
28 |
+
# =========
|
29 |
+
# Answer in Markdown:"""
|
30 |
|
31 |
def loading_pdf():
|
32 |
return "Loading..."
|