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