pszemraj commited on
Commit
e219aa1
1 Parent(s): 03e9034

🎨 improve formatting

Browse files

Signed-off-by: peter szemraj <[email protected]>

Files changed (1) hide show
  1. utils.py +4 -4
utils.py CHANGED
@@ -104,10 +104,10 @@ def saves_summary(
104
  if outpath is None
105
  else Path(outpath)
106
  )
107
- sum_text = [s["summary"][0] for s in summarize_output]
108
  sum_scores = [f"\n - {round(s['summary_score'],4)}" for s in summarize_output]
109
  scores_text = "\n".join(sum_scores)
110
- full_summary = "\n\t".join(sum_text)
111
 
112
  with open(
113
  outpath,
@@ -124,14 +124,14 @@ def saves_summary(
124
  outpath,
125
  "a",
126
  ) as fo:
127
- fo.write("\n" * 3)
128
  fo.write(f"## Section Scores:\n\n")
129
  fo.writelines(scores_text)
130
  fo.write("\n\n")
131
  fo.write(f"Date: {get_timestamp()}\n\n")
132
  if kwargs:
133
  fo.write("---\n\n")
134
- fo.write("Parameters:\n\n")
135
  for key, value in kwargs.items():
136
  fo.write(f"{key}: {value}\n")
137
  return outpath
 
104
  if outpath is None
105
  else Path(outpath)
106
  )
107
+ sum_text = [f"\t{s['summary'][0]}\n" for s in summarize_output]
108
  sum_scores = [f"\n - {round(s['summary_score'],4)}" for s in summarize_output]
109
  scores_text = "\n".join(sum_scores)
110
+ full_summary = "\n".join(sum_text)
111
 
112
  with open(
113
  outpath,
 
124
  outpath,
125
  "a",
126
  ) as fo:
127
+ fo.write("\n")
128
  fo.write(f"## Section Scores:\n\n")
129
  fo.writelines(scores_text)
130
  fo.write("\n\n")
131
  fo.write(f"Date: {get_timestamp()}\n\n")
132
  if kwargs:
133
  fo.write("---\n\n")
134
+ fo.write("## Parameters:\n\n")
135
  for key, value in kwargs.items():
136
  fo.write(f"{key}: {value}\n")
137
  return outpath