Peter commited on
Commit
b1e0e58
1 Parent(s): 53cfd2d

formatting

Browse files
Files changed (2) hide show
  1. app.py +1 -6
  2. utils.py +1 -1
app.py CHANGED
@@ -19,8 +19,6 @@ transformers.logging.set_verbosity_error()
19
  logging.basicConfig()
20
 
21
 
22
-
23
-
24
  def proc_submission(
25
  input_text: str,
26
  model_size: str,
@@ -83,7 +81,7 @@ def proc_submission(
83
  history["Summary Scores"] = "\n".join(sum_scores)
84
  history["Input"] = tr_in
85
  html = ""
86
- rt = round((time.perf_counter() - st)/60, 2)
87
  print(f"Runtime: {rt} minutes")
88
  html += f"<p>Runtime: {rt} minutes on CPU</p>"
89
  for name, item in history.items():
@@ -95,12 +93,9 @@ def proc_submission(
95
 
96
  html += ""
97
 
98
-
99
  return html
100
 
101
 
102
-
103
-
104
  if __name__ == "__main__":
105
 
106
  model, tokenizer = load_model_and_tokenizer("pszemraj/led-large-book-summary")
 
19
  logging.basicConfig()
20
 
21
 
 
 
22
  def proc_submission(
23
  input_text: str,
24
  model_size: str,
 
81
  history["Summary Scores"] = "\n".join(sum_scores)
82
  history["Input"] = tr_in
83
  html = ""
84
+ rt = round((time.perf_counter() - st) / 60, 2)
85
  print(f"Runtime: {rt} minutes")
86
  html += f"<p>Runtime: {rt} minutes on CPU</p>"
87
  for name, item in history.items():
 
93
 
94
  html += ""
95
 
 
96
  return html
97
 
98
 
 
 
99
  if __name__ == "__main__":
100
 
101
  model, tokenizer = load_model_and_tokenizer("pszemraj/led-large-book-summary")
utils.py CHANGED
@@ -46,4 +46,4 @@ def load_examples(src):
46
  text = f.read()
47
  text_examples.append([text, "large", 2, 512, 0.7, 3.5, 3])
48
 
49
- return text_examples
 
46
  text = f.read()
47
  text_examples.append([text, "large", 2, 512, 0.7, 3.5, 3])
48
 
49
+ return text_examples