Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def translate(text,lang):
|
|
49 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15',
|
50 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
51 |
]
|
52 |
-
query_text = f'Please translate {re.sub("
|
53 |
url = f'https://www.google.com/search?q={query_text}'
|
54 |
|
55 |
print(url)
|
|
|
49 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15',
|
50 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
51 |
]
|
52 |
+
query_text = f'Please translate {re.sub("[(^-)(-$)]","",text.replace("","-").replace("- -"," ")).strip()}, into {lang}'
|
53 |
url = f'https://www.google.com/search?q={query_text}'
|
54 |
|
55 |
print(url)
|