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 | |