lvwerra HF Staff commited on
Commit
6876d23
·
verified ·
1 Parent(s): e62a82f

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +4 -15
run.py CHANGED
@@ -230,11 +230,8 @@ def postprocess_report(report, summaries, topic, num_articles, model):
230
  report_summary = f"""\
231
  # News Summary: {topic}
232
 
233
- **Period:** {(date.today() - timedelta(days=1)).strftime('%Y-%m-%d')} to {date.today().strftime('%Y-%m-%d')}
234
-
235
- **Processed articles:** {num_articles}
236
-
237
- **Model**: {model}
238
  """
239
 
240
  report_content = report.split("</think>")[1].strip() if "</think>" in report else report.strip()
@@ -244,24 +241,16 @@ def postprocess_report(report, summaries, topic, num_articles, model):
244
  final_report = f"""\
245
  {report_content.replace('# NEWS_SUMMARY', report_summary)}
246
 
247
- ## Sources
248
 
249
- <details>
250
- <summary>All sources</summary>
251
 
252
  {summaries}
253
 
254
- </details>
255
-
256
  ## Model reasoning
257
 
258
- <details>
259
- <summary>Model thought traces</summary>
260
-
261
  {report_thoughts}
262
 
263
- </details>
264
-
265
  """
266
 
267
  return final_report
 
230
  report_summary = f"""\
231
  # News Summary: {topic}
232
 
233
+ **Period:** {(date.today() - timedelta(days=1)).strftime('%Y-%m-%d')} to {date.today().strftime('%Y-%m-%d')} | \
234
+ **Processed articles:** {num_articles} | **Model**: {model}
 
 
 
235
  """
236
 
237
  report_content = report.split("</think>")[1].strip() if "</think>" in report else report.strip()
 
241
  final_report = f"""\
242
  {report_content.replace('# NEWS_SUMMARY', report_summary)}
243
 
244
+ ## Details
245
 
246
+ ## Sources
 
247
 
248
  {summaries}
249
 
 
 
250
  ## Model reasoning
251
 
 
 
 
252
  {report_thoughts}
253
 
 
 
254
  """
255
 
256
  return final_report