AMR-KELEG commited on
Commit
9cdf3d5
·
1 Parent(s): 0fff614

Avoid having excess spaces

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -34,6 +34,8 @@ def preprocess_text(arabic_text, remove_urls, remove_latin):
34
  if remove_latin:
35
  arabic_text = re.sub(r"[a-zA-Z]", "", arabic_text)
36
 
 
 
37
  return arabic_text
38
 
39
 
 
34
  if remove_latin:
35
  arabic_text = re.sub(r"[a-zA-Z]", "", arabic_text)
36
 
37
+ arabic_text = arabic_text.strip()
38
+
39
  return arabic_text
40
 
41