algApi.py 645 B

1234567891011121314151617181920212223242526272829
  1. """
  2. @author: luojunhui
  3. """
  4. import requests
  5. class AlgApi(object):
  6. """
  7. 算法api
  8. """
  9. @classmethod
  10. def getScoreList(cls, accountName, title_list):
  11. """
  12. 获取得分
  13. :return:
  14. """
  15. url = "http://61.48.133.26:6060/score_list"
  16. body = {
  17. "account_nickname_list": [accountName],
  18. "text_list": title_list,
  19. "max_time": None,
  20. "min_time": None,
  21. "interest_type": "avg",
  22. "sim_type": "mean",
  23. "rate": 0.1
  24. }
  25. response = requests.post(url=url, headers={}, json=body)
  26. return response.json()