File size: 390 Bytes
03c1af1
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import requests

def call_zh_en_naive_model(zh_question):
    response = requests.post("https://svjack-translate-chinese-to-english.hf.space/run/predict", json={
  "data": [
    zh_question,
    ]}).json()
    data = response["data"]
    if data:
        data = data[0]
        English_Question = data["English Question"]
    else:
        English_Question = ""
    return English_Question