svjack's picture
Upload 5 files
03c1af1
raw
history blame
471 Bytes
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