Spaces:
Runtime error
Runtime error
File size: 259 Bytes
cb0791d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import httpx, json
deeplx_api = "http://127.0.0.1:1188/translate"
data = {
"text": "Hello World",
"source_lang": "EN",
"target_lang": "ZH"
}
# JA KO
post_data = json.dumps(data)
r = httpx.post(url = deeplx_api, data = post_data).json()
print(r["data"]) |