Update app.py
Browse files
app.py
CHANGED
@@ -71,7 +71,7 @@ def proc_submission(
|
|
71 |
|
72 |
st = time.perf_counter()
|
73 |
history = {}
|
74 |
-
clean_text = clean(input_text,
|
75 |
max_input_length = 2048 if model_size == "tldr" else max_input_length
|
76 |
processed = truncate_word_count(clean_text, max_input_length)
|
77 |
|
|
|
71 |
|
72 |
st = time.perf_counter()
|
73 |
history = {}
|
74 |
+
clean_text = clean(input_text, extra_spaces=True, lowercase=True, reg="\b(?!(?:Although|Also)\b)(?:[A-Z][A-Za-z'`-]+)(?:,? (?:(?:and |& )?(?:[A-Z][A-Za-z'`-]+)|(?:et al.?)))*(?:, *(?:19|20)[0-9][0-9](?:, p\.? [0-9]+)?| *\((?:19|20)[0-9][0-9](?:, p\.? [0-9]+)?\))", reg_replace="")
|
75 |
max_input_length = 2048 if model_size == "tldr" else max_input_length
|
76 |
processed = truncate_word_count(clean_text, max_input_length)
|
77 |
|