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

def call_en_zh_reader(English_Span, Chinese_Sentence):
    assert type(English_Span) == type("")
    assert type(Chinese_Sentence) == type("")
    response = requests.post("https://svjack-extract-similar-chinese-span-by--5daeb83.hf.space/run/predict", json={
      "data": [
        English_Span,
        Chinese_Sentence,
    ]}).json()
    data = response["data"]
    if data:
        data = data[0]
        pass
    else:
        pass
    return data