Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,6 +41,11 @@ def predict(input_text):
|
|
| 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 |
return pcnt_file_cr_cap
|
| 45 |
|
| 46 |
if __name__ == "__main__":
|
|
|
|
| 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 |
+
|
| 49 |
return pcnt_file_cr_cap
|
| 50 |
|
| 51 |
if __name__ == "__main__":
|