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