Bladeren bron

提取标题特征

luojunhui 1 dag geleden
bovenliggende
commit
f4a3d39755
1 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 3 2
      applications/tasks/llm_tasks/process_title.py

+ 3 - 2
applications/tasks/llm_tasks/process_title.py

@@ -7,6 +7,7 @@ from typing import Optional, List, Dict, Tuple
 from applications.api import fetch_deepseek_completion
 from applications.utils import yield_batch
 from applications.tasks.llm_tasks.prompts import extract_article_features
+from tqdm.asyncio import tqdm
 
 
 class Const:
@@ -676,7 +677,7 @@ class ExtractTitleFeatures(Const):
                 feature_dict["structure"]["title_type"],
                 self.SUCCESS_STATUS,
                 title_id,
-                self.INIT_STATUS,
+                self.PROCESSING_STATUS,
             ),
         )
 
@@ -698,7 +699,7 @@ class ExtractTitleFeatures(Const):
             model="default", prompt=prompt, output_type="json"
         )
 
-        for title in title_list:
+        for title in tqdm(title_list):
             features = feature_dict.get(title, {})
             if not features:
                 continue