# 后端暴露的接口,post请求
import requests
url = "http://127.0.0.1:8888/predict_api"
json = {"title":"同步A股首秀:港股缩量回调"}
response = requests.post(url=url, json=json)
# 200:请求成功
print('response-->', response)
print('response.json()-->', response.json())
print('response.json()-->', response.json()['pred_class'])