wldmr commited on
Commit
e88ea86
·
1 Parent(s): 82e77d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -38,11 +38,7 @@ def predict(input_text):
38
  pcnt_file_cr=' '.join(pcnt_file_array_hash).replace('#','\n')
39
 
40
  regex1 = r"\bi\b"
41
- regex2 = r"(?<=[.?!]|\n)\s*\w"
42
- pcnt_file_cr_cap = re.sub(regex2, lambda x: x.group().upper(), re.sub(regex1, "I", pcnt_file_cr))
43
-
44
- regex1 = r"\bi\b"
45
- regex2 = r"(?<=[.?!]|\n)\s*\w"
46
  regex3 = r"^\w"
47
  pcnt_file_cr_cap = re.sub(regex3, lambda x: x.group().upper(), re.sub(regex2, lambda x: x.group().upper(), re.sub(regex1, "I", pcnt_file_cr)))
48
 
 
38
  pcnt_file_cr=' '.join(pcnt_file_array_hash).replace('#','\n')
39
 
40
  regex1 = r"\bi\b"
41
+ regex2 = r"(?<=[.?!;])\s*\w"
 
 
 
 
42
  regex3 = r"^\w"
43
  pcnt_file_cr_cap = re.sub(regex3, lambda x: x.group().upper(), re.sub(regex2, lambda x: x.group().upper(), re.sub(regex1, "I", pcnt_file_cr)))
44