Yaron Koresh commited on
Commit
7206ba2
·
verified ·
1 Parent(s): 2b85ff1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -26,14 +26,14 @@ else:
26
 
27
  def translate(text,lang):
28
  resp = requests.post(
29
- "url" = "https://www.bing.com/ttranslatev3?isVertical=1&&IG=13172331D0494B12ABFA8F4454EEB479&IID=translator.5026",
30
- "referrer" = "https://www.bing.com/translator?to=en",
31
- "referrerPolicy" = "origin-when-cross-origin",
32
- "data" = f"&fromLang=auto-detect&to={lang}}&token=cdkbEXg93_iQE28MFPv9ScrPY_fs2OAw&key=1722124106496&text={text}&tryFetchingGenderDebiasedTranslations=true",
33
- "method" = "POST",
34
- "mode" = "cors",
35
- "credentials" = "include"
36
- "headers" = {
37
  "accept": "*/*",
38
  "accept-language": "en-US,en;q=0.9,he;q=0.8,ha;q=0.7",
39
  "content-type": "application/x-www-form-urlencoded",
 
26
 
27
  def translate(text,lang):
28
  resp = requests.post(
29
+ url = "https://www.bing.com/ttranslatev3?isVertical=1&&IG=13172331D0494B12ABFA8F4454EEB479&IID=translator.5026",
30
+ referrer = "https://www.bing.com/translator?to=en",
31
+ referrerPolicy = "origin-when-cross-origin",
32
+ data = f"&fromLang=auto-detect&to={lang}}&token=cdkbEXg93_iQE28MFPv9ScrPY_fs2OAw&key=1722124106496&text={text}&tryFetchingGenderDebiasedTranslations=true",
33
+ method = "POST",
34
+ mode = "cors",
35
+ credentials = "include",
36
+ headers = {
37
  "accept": "*/*",
38
  "accept-language": "en-US,en;q=0.9,he;q=0.8,ha;q=0.7",
39
  "content-type": "application/x-www-form-urlencoded",