Yaron Koresh commited on
Commit
a817578
·
verified ·
1 Parent(s): 050102b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def translate(text,lang):
42
  }
43
  )
44
  print(resp)
45
- translated = fromstring(resp.content).xpath('//span[@lang]')[0].text().strip()
46
  return re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', translated)).lower().strip()
47
 
48
  def generate_random_string(length):
 
42
  }
43
  )
44
  print(resp)
45
+ translated = fromstring(resp.content).xpath('//span[@lang]')[0].text.strip()
46
  return re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', translated)).lower().strip()
47
 
48
  def generate_random_string(length):