Update app.py
Browse files
app.py
CHANGED
@@ -234,8 +234,15 @@ def upload_and_chat(file, query):
|
|
234 |
|
235 |
initial_prompt = PromptTemplate(
|
236 |
input_variables=["text"],
|
237 |
-
template="""
|
|
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
{text}
|
240 |
|
241 |
--- Summary ---
|
@@ -243,10 +250,15 @@ initial_prompt = PromptTemplate(
|
|
243 |
)
|
244 |
refine_prompt = PromptTemplate(
|
245 |
input_variables=["existing_answer", "text"],
|
246 |
-
template="""
|
|
|
247 |
{existing_answer}
|
248 |
|
249 |
-
Refine the summary based on the new content below. Add or update information only if it's relevant.
|
|
|
|
|
|
|
|
|
250 |
|
251 |
{text}
|
252 |
|
|
|
234 |
|
235 |
initial_prompt = PromptTemplate(
|
236 |
input_variables=["text"],
|
237 |
+
template="""
|
238 |
+
You are a document summarisation expert. Read the following text and extract the most important ideas, conclusions, and key facts.
|
239 |
|
240 |
+
Return a **concise, bullet-point summary** in **British English**.
|
241 |
+
- Avoid markdown formatting like bold (**), italic (*), headers (##), or code symbols (`).
|
242 |
+
- You may use simple list markers like "-" or "•" to separate points.
|
243 |
+
- Keep the tone professional and easy to read.
|
244 |
+
|
245 |
+
--- Document ---
|
246 |
{text}
|
247 |
|
248 |
--- Summary ---
|
|
|
250 |
)
|
251 |
refine_prompt = PromptTemplate(
|
252 |
input_variables=["existing_answer", "text"],
|
253 |
+
template="""
|
254 |
+
You already have an existing summary:
|
255 |
{existing_answer}
|
256 |
|
257 |
+
Refine the summary based on the new content below. Add or update information only if it's relevant.
|
258 |
+
|
259 |
+
- Maintain bullet-point format using "-" or "•" if needed.
|
260 |
+
- Do not use markdown formatting like **bold**, *italic*, or code symbols.
|
261 |
+
- Keep the tone concise, structured, and in British English.
|
262 |
|
263 |
{text}
|
264 |
|