Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,10 +141,15 @@ def build_model(model_choice, temperature=0.7):
|
|
| 141 |
# -------------------------------------------------
|
| 142 |
prompt_template = PromptTemplate(
|
| 143 |
template=(
|
| 144 |
-
"
|
| 145 |
-
"
|
| 146 |
-
"
|
| 147 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
),
|
| 149 |
input_variables=["context", "question"]
|
| 150 |
)
|
|
|
|
| 141 |
# -------------------------------------------------
|
| 142 |
prompt_template = PromptTemplate(
|
| 143 |
template=(
|
| 144 |
+
"You are a helpful assistant.\n\n"
|
| 145 |
+
"Answer the question using the context provided below.\n"
|
| 146 |
+
"If the context does not mention the topic, say clearly: 'There is no mention of the topic in the video you provided.'\n"
|
| 147 |
+
"Then, based on your own knowledge, try to answer the question.\n"
|
| 148 |
+
"If both the context and your knowledge are insufficient, say: 'I don't know.'\n\n"
|
| 149 |
+
"Keep the answer format neat, clean, and human-readable.\n\n"
|
| 150 |
+
"Context:\n{context}\n\n"
|
| 151 |
+
"Question:\n{question}"
|
| 152 |
+
|
| 153 |
),
|
| 154 |
input_variables=["context", "question"]
|
| 155 |
)
|