test_tagging.py 467 B

1234567891011121314
  1. import requests
  2. import logging
  3. logging.basicConfig(level=logging.INFO, force=True,format='%(asctime)s - %(levelname)s - %(message)s')
  4. logging.info("app starting!")
  5. res = requests.post("http://localhost:9876/api/aitag/v1/tagging", json={
  6. # "app_id": "test_app",
  7. # "timestamp": 1234567890,
  8. # "sign": "test_sign",
  9. "business_attr": "test_attr",
  10. "phrase": "职业:水产养殖人员 投向:海水养殖 用途:个人经营"
  11. })
  12. logging.info(res.text)