Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -144,8 +144,8 @@ def translate(text,lang):
|
|
144 |
'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',
|
145 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
146 |
]
|
147 |
-
|
148 |
-
query_text = f'Please translate {
|
149 |
url = f'https://www.google.com/search?q={query_text}'
|
150 |
print(url)
|
151 |
content = str(requests.get(
|
|
|
144 |
'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',
|
145 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
146 |
]
|
147 |
+
text = text.strip()
|
148 |
+
query_text = f'Please translate {text}, into {lang}'
|
149 |
url = f'https://www.google.com/search?q={query_text}'
|
150 |
print(url)
|
151 |
content = str(requests.get(
|