svjack commited on
Commit
2e65ffd
Β·
1 Parent(s): 63df88b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -43,12 +43,20 @@ def translate_zh_to_en(zh_text):
43
 
44
  def translate_en_to_zh(en_text):
45
  assert type(en_text) == type("")
 
46
  response = requests.post("https://svjack-translate.hf.space/run/predict", json={
47
  "data": [
48
  en_text,
49
  "en",
50
  "zh",
51
  ]}).json()
 
 
 
 
 
 
 
52
  data = response["data"]
53
  data = data[0]
54
  data = data["Target Question"]
 
43
 
44
  def translate_en_to_zh(en_text):
45
  assert type(en_text) == type("")
46
+ '''
47
  response = requests.post("https://svjack-translate.hf.space/run/predict", json={
48
  "data": [
49
  en_text,
50
  "en",
51
  "zh",
52
  ]}).json()
53
+ '''
54
+ response = requests.post("https://svjack-ctranslate.hf.space/run/predict", json={
55
+ "data": [
56
+ en_text,
57
+ "en",
58
+ "zh",
59
+ ]}).json()
60
  data = response["data"]
61
  data = data[0]
62
  data = data["Target Question"]