Peter commited on
Commit
bf00efa
1 Parent(s): d6ff157

accept up to 2048 words for base

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -59,7 +59,7 @@ def proc_submission(
59
  st = time.perf_counter()
60
  history = {}
61
  clean_text = clean(input_text, lower=False)
62
- max_input_length = 1024 if model_size == "base" else max_input_length
63
  processed = truncate_word_count(clean_text, max_input_length)
64
 
65
  if processed["was_truncated"]:
@@ -165,7 +165,7 @@ if __name__ == "__main__":
165
  gr.Markdown(
166
  "Enter text below in the text area. The text will be summarized [using the selected parameters](https://huggingface.co/blog/how-to-generate). Optionally load an example from the list below or upload a file."
167
  )
168
-
169
  model_size = gr.Radio(
170
  choices=["base", "large"], label="model size", value="large"
171
  )
 
59
  st = time.perf_counter()
60
  history = {}
61
  clean_text = clean(input_text, lower=False)
62
+ max_input_length = 2048 if model_size == "base" else max_input_length
63
  processed = truncate_word_count(clean_text, max_input_length)
64
 
65
  if processed["was_truncated"]:
 
165
  gr.Markdown(
166
  "Enter text below in the text area. The text will be summarized [using the selected parameters](https://huggingface.co/blog/how-to-generate). Optionally load an example from the list below or upload a file."
167
  )
168
+ gr.Markdown("_The base model is less performant than the large model, but is faster and will accept up to 2048 words per input (Large model accepts up to 768)._")
169
  model_size = gr.Radio(
170
  choices=["base", "large"], label="model size", value="large"
171
  )