fix(nlp): fix missing processing dataset status update
This commit is contained in:
@@ -18,6 +18,10 @@ def process_dataset(self, dataset_id: int, posts: list, topics: dict):
|
|||||||
try:
|
try:
|
||||||
df = pd.DataFrame(posts)
|
df = pd.DataFrame(posts)
|
||||||
|
|
||||||
|
dataset_manager.set_dataset_status(
|
||||||
|
dataset_id, "processing", "NLP Processing Started"
|
||||||
|
)
|
||||||
|
|
||||||
processor = DatasetEnrichment(df, topics)
|
processor = DatasetEnrichment(df, topics)
|
||||||
enriched_df = processor.enrich()
|
enriched_df = processor.enrich()
|
||||||
|
|
||||||
@@ -55,6 +59,10 @@ def fetch_and_process_dataset(
|
|||||||
|
|
||||||
df = pd.DataFrame(posts)
|
df = pd.DataFrame(posts)
|
||||||
|
|
||||||
|
dataset_manager.set_dataset_status(
|
||||||
|
dataset_id, "processing", "NLP Processing Started"
|
||||||
|
)
|
||||||
|
|
||||||
processor = DatasetEnrichment(df, topics)
|
processor = DatasetEnrichment(df, topics)
|
||||||
enriched_df = processor.enrich()
|
enriched_df = processor.enrich()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user