lac_serving_demo.py 334 字节
Newer Older
走神的阿圆's avatar
走神的阿圆 已提交
1 2 3 4 5 6 7 8 9 10 11
# coding: utf8
import requests
import json

if __name__ == "__main__":
    text_list = ["今天是个好日子", "天气预报说今天要下雨"]
    text = {"text": text_list}
    url = "http://127.0.0.1:8866/predict/text/lac"
    r = requests.post(url=url, data=text)

    print(json.dumps(r.json(), indent=4, ensure_ascii=False))