Yaron Koresh commited on
Commit
98eb307
·
verified ·
1 Parent(s): 9c588a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -268,8 +268,8 @@ def xpath_finder(str,pattern):
268
  def translate(text,lang):
269
  if text == None or lang == None:
270
  return ""
271
- text = re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', text)).lower().strip()
272
- lang = re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', lang)).lower().strip()
273
  if text == "" or lang == "":
274
  return ""
275
  if len(text) > 38:
 
268
  def translate(text,lang):
269
  if text == None or lang == None:
270
  return ""
271
+ text = re.sub(f'[{punctuation}]', '', re.sub('[\s+]', ' ', text)).lower().strip()
272
+ lang = re.sub(f'[{punctuation}]', '', re.sub('[\s+]', ' ', lang)).lower().strip()
273
  if text == "" or lang == "":
274
  return ""
275
  if len(text) > 38: