Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,11 +59,9 @@ def sanitize_input(text):
|
|
| 59 |
|
| 60 |
def sanitize_prompt(text):
|
| 61 |
"""
|
| 62 |
-
Sanitizes input to
|
| 63 |
"""
|
| 64 |
-
|
| 65 |
-
clean_text = re.sub(r"[^a-zA-Z0-9\s.,!?@:\-]", "", text)
|
| 66 |
-
return clean_text.strip()[:8000]
|
| 67 |
def validate_email(email):
|
| 68 |
"""
|
| 69 |
Validates that the provided email is in a valid format.
|
|
|
|
| 59 |
|
| 60 |
def sanitize_prompt(text):
|
| 61 |
"""
|
| 62 |
+
Sanitizes input to limits its length.
|
| 63 |
"""
|
| 64 |
+
return text.strip()[:8000]
|
|
|
|
|
|
|
| 65 |
def validate_email(email):
|
| 66 |
"""
|
| 67 |
Validates that the provided email is in a valid format.
|