Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -119,9 +119,15 @@ llm = HuggingFaceHub(repo_id=repo_id,
|
|
119 |
"top_k":50,
|
120 |
"top_p":0.95, "eos_token_id":49155})
|
121 |
|
122 |
-
prompt_template = """You are a very helpful AI assistant. Please ONLY use {context} to answer the user's input question. If you don't know the answer, just say that you don't know. DON'T try to make up an answer and do NOT go beyond the given context without the user's explicitly asking you to do so!
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
Question: {question}
|
124 |
-
|
125 |
"""
|
126 |
|
127 |
PROMPT = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
|
|
|
119 |
"top_k":50,
|
120 |
"top_p":0.95, "eos_token_id":49155})
|
121 |
|
122 |
+
#prompt_template = """You are a very helpful AI assistant. Please ONLY use {context} to answer the user's input question. If you don't know the answer, just say that you don't know. DON'T try to make up an answer and do NOT go beyond the given context without the user's explicitly asking you to do so!
|
123 |
+
#Question: {question}
|
124 |
+
#Helpful AI Repsonse:
|
125 |
+
#"""
|
126 |
+
|
127 |
+
prompt_template = """You are a very helpful AI assistant. Please ONLY use the input documents as context to answer the user's input question. If you don't know the answer, just say that you don't know.
|
128 |
+
Context: {context}
|
129 |
Question: {question}
|
130 |
+
Helpful AI Repsonse:
|
131 |
"""
|
132 |
|
133 |
PROMPT = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
|