Spaces:
Paused
Paused
Remove numbers, spacial characters and emoji from prompt to avoid mubert english error
Browse files
app.py
CHANGED
@@ -256,6 +256,7 @@ def remove_nonalphanumeric(text):
|
|
256 |
def clean_text(text):
|
257 |
clean_text = remove_nonalphanumeric(text)
|
258 |
clean_text = remove_emoji(clean_text)
|
|
|
259 |
return clean_text
|
260 |
|
261 |
article = """
|
|
|
256 |
def clean_text(text):
|
257 |
clean_text = remove_nonalphanumeric(text)
|
258 |
clean_text = remove_emoji(clean_text)
|
259 |
+
clean_text = re.sub(r'\d+', '', clean_text) # Remove any number
|
260 |
return clean_text
|
261 |
|
262 |
article = """
|