Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
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 |
|