Browse Source

修改规则

罗俊辉 1 year ago
parent
commit
7ede14b989
1 changed files with 11 additions and 11 deletions
  1. 11 11
      applications/match_alg/recall.py

+ 11 - 11
applications/match_alg/recall.py

@@ -323,22 +323,22 @@ async def recall_videos(trace_id, s_videos):
     # 在两边召回视频
     # pq_videos
     recall_video_list = select_pq_videos()
-    dirs_1 = os.path.join(os.getcwd(), 'applications', 'static', 'out_videos')
-    file_list = [os.path.join(dirs_1, "{}.json".format(vid)) for vid in s_videos]
-    search_list = []
-    for file in file_list:
-        with open(file, encoding="utf-8") as f:
-            obj = json.loads(f.read())
-            if obj:
-                obj['video_id'] = file.split("/")[-1].replace('.json', '')
-        search_list.append(obj)
+    # dirs_1 = os.path.join(os.getcwd(), 'applications', 'static', 'out_videos')
+    # file_list = [os.path.join(dirs_1, "{}.json".format(vid)) for vid in s_videos]
+    # search_list = []
+    # for file in file_list:
+    #     with open(file, encoding="utf-8") as f:
+    #         obj = json.loads(f.read())
+    #         if obj:
+    #             obj['video_id'] = file.split("/")[-1].replace('.json', '')
+    #     search_list.append(obj)
     logging(
         code="1002",
         info="召回视频",
         data={
             "pq_list": [],
-            "search_list": search_list
+            "search_list": s_videos
         },
         trace_id=trace_id
     )
-    return recall_video_list, search_list
+    return recall_video_list, s_videos