소스 검색

use local nlp function

luojunhui 4 달 전
부모
커밋
c277f631e7
2개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      test/nlp_dev.py
  2. 6 3
      test/score_list_dev.py

+ 1 - 1
test/nlp_dev.py

@@ -192,7 +192,7 @@ def test_request(url):
     print(b - a)
 
 
-url_list = ["http://192.168.100.31:6060/nlp"]
+url_list = ["http://47.97.87.145:6060/nlp"]
 test_request(url_list[0])
 # with ThreadPoolExecutor(max_workers=3) as Pool:
 #     Pool.map(test_request, url_list)

+ 6 - 3
test/score_list_dev.py

@@ -17,7 +17,8 @@ def score_list(account):
     :param account:
     :return:
     """
-    url2 = "http://61.48.133.26:6061/score_list"
+    # url2 = "http://61.48.133.26:6060/score_list"
+    url2 = "http://47.97.87.145:6060/score_list"
     body = {
         "gh_id_list": [
             "gh_02f5bca5b5d9"
@@ -33,8 +34,10 @@ def score_list(account):
         "rate": 0.1,
         "view_count_filter": 1000
     }
-    response = requests.post(url=url2, headers={}, json=body).json()
-    print(json.dumps(response, ensure_ascii=False, indent=4))
+    response = requests.post(url=url2, headers={}, json=body)
+    print(response.status_code)
+    print(response.text)
+    # print(json.dumps(response, ensure_ascii=False, indent=4))
     return response