Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,7 +71,7 @@ def translate(text,lang):
|
|
| 71 |
translated = text
|
| 72 |
|
| 73 |
try:
|
| 74 |
-
src_lang = html.xpath('//span[@class="source-language"]')[0].text_content().strip()
|
| 75 |
trgt_lang = html.xpath('//span[@class="target-language"]')[0].text_content().strip()
|
| 76 |
src_text = html.xpath('//pre[@id="tw-source-text"]/span')[0].text_content().strip()
|
| 77 |
trgt_text = html.xpath('//pre[@id="tw-target-text"]/span')[0].text_content().strip()
|
|
|
|
| 71 |
translated = text
|
| 72 |
|
| 73 |
try:
|
| 74 |
+
src_lang = html.xpath('//span[@class="source-language"]/span')[0].text_content().strip()
|
| 75 |
trgt_lang = html.xpath('//span[@class="target-language"]')[0].text_content().strip()
|
| 76 |
src_text = html.xpath('//pre[@id="tw-source-text"]/span')[0].text_content().strip()
|
| 77 |
trgt_text = html.xpath('//pre[@id="tw-target-text"]/span')[0].text_content().strip()
|