Yaron Koresh commited on
Commit
db97e79
·
verified ·
1 Parent(s): cb3a366

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -41,6 +41,7 @@ def translate(text,lang):
41
  'User-Agent': random.choice(user_agents)
42
  }
43
  )
 
44
  translated = fromstring(resp.content).xpath('//div[@id="translate-tool__result"')[0].text().strip()
45
  return re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', translated)).lower().strip()
46
 
 
41
  'User-Agent': random.choice(user_agents)
42
  }
43
  )
44
+ print(resp)
45
  translated = fromstring(resp.content).xpath('//div[@id="translate-tool__result"')[0].text().strip()
46
  return re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', translated)).lower().strip()
47