소스 검색

score_list接口

罗俊辉 11 달 전
부모
커밋
95e59302fd
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      routes/accountServer.py
  2. 1 1
      test/nlp_dev.py
  3. 3 3
      test/score_list_dev.py

+ 1 - 1
routes/accountServer.py

@@ -28,7 +28,7 @@ class AccountServer(object):
         nlp process
         """
         headers = {"Content-Type": "application/json"}
-        url = "http://localhost:6060/nlp"
+        url = "http://localhost:6061/nlp"
         body = {
             "data": {
                 "text_list_a": [i.replace("'", "") for i in title_list],

+ 1 - 1
test/nlp_dev.py

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

+ 3 - 3
test/score_list_dev.py

@@ -10,8 +10,8 @@ class ArticleRank(object):
     """
     账号排序
     """
-    url = "http://192.168.100.31:8179/score_list"
-    url1 = "http://47.98.154.124:6060/score_list"
+    url = "http://192.168.100.31:6061/score_list"
+    # url1 = "http://47.98.154.124:6060/score_list"
     # url1 = "http://localhost:6060/score_list"
 
     @classmethod
@@ -31,7 +31,7 @@ class ArticleRank(object):
             "sim_type": "mean",
             "rate": 0.1
         }
-        response = requests.post(url=cls.url1, headers={}, json=body).json()
+        response = requests.post(url=cls.url, headers={}, json=body).json()
         return response