Spaces:
Sleeping
Sleeping
ASG Models
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -99,7 +99,7 @@ import re
|
|
99 |
def clean_text(text):
|
100 |
# Remove symbols and extra spaces
|
101 |
cleaned_text = re.sub(r'[^\w\s]', '', text) # Remove symbols
|
102 |
-
cleaned_text = re.sub(r'\s+', '
|
103 |
return cleaned_text.strip() # Remove leading/trailing spaces
|
104 |
|
105 |
|
|
|
99 |
def clean_text(text):
|
100 |
# Remove symbols and extra spaces
|
101 |
cleaned_text = re.sub(r'[^\w\s]', '', text) # Remove symbols
|
102 |
+
cleaned_text = re.sub(r'\s+', ' ', cleaned_text) # Normalize spaces
|
103 |
return cleaned_text.strip() # Remove leading/trailing spaces
|
104 |
|
105 |
|