ChienChung commited on
Commit
02ef84e
·
verified ·
1 Parent(s): 78048ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -234,8 +234,15 @@ def upload_and_chat(file, query):
234
 
235
  initial_prompt = PromptTemplate(
236
  input_variables=["text"],
237
- template="""Write a concise and structured summary of the following content. Focus on capturing the main ideas and key details:
 
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="""You already have an existing summary:
 
247
  {existing_answer}
248
 
249
- Refine the summary based on the new content below. Add or update information only if it's relevant. Keep it concise:
 
 
 
 
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