Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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"(?<=[
|
| 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 |
|