fffiloni commited on
Commit
7401c2d
โ€ข
1 Parent(s): 26d67da

Remove numbers, spacial characters and emoji from prompt to avoid mubert english error

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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 = """