Blaise-g commited on
Commit
e12f59b
β€’
1 Parent(s): b66ab4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -96,15 +96,16 @@ def proc_submission(
96
  f" - Section {i}: {round(s['summary_score'],4)}"
97
  for i, s in enumerate(_summaries)
98
  ]
99
- #rates = [
100
- #f" - Section {i}: {round(s['compression_rate'],3)}"
101
- #for i, s in enumerate(_summaries)
102
- #]
103
 
104
  sum_text_out = "\n".join(sum_text)
105
  history["Summary Scores"] = "<br><br>"
106
  scores_out = "\n".join(sum_scores)
107
- #rates_out = "\n".join(rates)
 
108
  rt = round((time.perf_counter() - st) / 60, 2)
109
  print(f"Runtime: {rt} minutes")
110
  html = ""
@@ -114,7 +115,7 @@ def proc_submission(
114
 
115
  html += ""
116
 
117
- return html, sum_text_out, scores_out#, rates_out
118
 
119
 
120
  def load_single_example_text(
@@ -286,7 +287,7 @@ if __name__ == "__main__":
286
  token_batch_length,
287
  length_penalty,
288
  ],
289
- outputs=[output_text, summary_text, summary_scores]#, rates],
290
  )
291
 
292
  demo.launch(enable_queue=True, share=False)
 
96
  f" - Section {i}: {round(s['summary_score'],4)}"
97
  for i, s in enumerate(_summaries)
98
  ]
99
+ rates = [
100
+ f" - Section {i}: {round(s['compression_rate'],3)}"
101
+ for i, s in enumerate(_summaries)
102
+ ]
103
 
104
  sum_text_out = "\n".join(sum_text)
105
  history["Summary Scores"] = "<br><br>"
106
  scores_out = "\n".join(sum_scores)
107
+ history["Compression Rates"] = "<br><br>"
108
+ rates_out = "\n".join(rates)
109
  rt = round((time.perf_counter() - st) / 60, 2)
110
  print(f"Runtime: {rt} minutes")
111
  html = ""
 
115
 
116
  html += ""
117
 
118
+ return html, sum_text_out, scores_out, rates_out
119
 
120
 
121
  def load_single_example_text(
 
287
  token_batch_length,
288
  length_penalty,
289
  ],
290
+ outputs=[output_text, summary_text, summary_scores, rates],
291
  )
292
 
293
  demo.launch(enable_queue=True, share=False)