Peter commited on
Commit
3b66adc
1 Parent(s): 98a3ea7
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -94,7 +94,10 @@ def proc_submission(
94
  **settings,
95
  )
96
  sum_text = [s["summary"][0] for s in _summaries]
97
- sum_scores = [f"\n - Section {i}: {round(s['summary_score'],4)}" for i, s in enumerate(_summaries)]
 
 
 
98
 
99
  history["Summary Text"] = "\n\t".join(sum_text)
100
  history["Summary Scores"] = "\n".join(sum_scores)
@@ -142,7 +145,9 @@ if __name__ == "__main__":
142
  label="input text",
143
  placeholder="Enter text to summarize, the text will be cleaned and truncated on Spaces. Narrative, academic (both papers and lecture transcription), and article text work well. May take a bit to generate depending on the input text :)",
144
  ),
145
- gr.inputs.radio(choices=['base', 'large'], label='model size', default='base'),
 
 
146
  gr.inputs.Slider(
147
  minimum=1, maximum=6, label="num_beams", default=4, step=1
148
  ),
@@ -174,5 +179,4 @@ if __name__ == "__main__":
174
  article="The model can be used with tag [pszemraj/led-large-book-summary](https://huggingface.co/pszemraj/led-large-book-summary). See the model card for details on usage & a notebook for a tutorial.",
175
  examples=load_examples(),
176
  cache_examples=False,
177
- ).launch(
178
- )
 
94
  **settings,
95
  )
96
  sum_text = [s["summary"][0] for s in _summaries]
97
+ sum_scores = [
98
+ f"\n - Section {i}: {round(s['summary_score'],4)}"
99
+ for i, s in enumerate(_summaries)
100
+ ]
101
 
102
  history["Summary Text"] = "\n\t".join(sum_text)
103
  history["Summary Scores"] = "\n".join(sum_scores)
 
145
  label="input text",
146
  placeholder="Enter text to summarize, the text will be cleaned and truncated on Spaces. Narrative, academic (both papers and lecture transcription), and article text work well. May take a bit to generate depending on the input text :)",
147
  ),
148
+ gr.inputs.radio(
149
+ choices=["base", "large"], label="model size", default="base"
150
+ ),
151
  gr.inputs.Slider(
152
  minimum=1, maximum=6, label="num_beams", default=4, step=1
153
  ),
 
179
  article="The model can be used with tag [pszemraj/led-large-book-summary](https://huggingface.co/pszemraj/led-large-book-summary). See the model card for details on usage & a notebook for a tutorial.",
180
  examples=load_examples(),
181
  cache_examples=False,
182
+ ).launch()