Skip to content

Commit

Permalink
Merge pull request #121 from rootcodelabs/classifier-132
Browse files Browse the repository at this point in the history
disable data synthasis
  • Loading branch information
pamodaDilranga authored Jul 29, 2024
2 parents ac7af07 + ecee7f4 commit 9d2f605
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dataset-processor/dataset_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import json
import requests
from data_enrichment.data_enrichment import DataEnrichment
# from data_enrichment.data_enrichment import DataEnrichment
from constants import *
from s3_mock import S3FileCounter

Expand All @@ -19,7 +19,7 @@

class DatasetProcessor:
def __init__(self):
self.data_enricher = DataEnrichment()
# self.data_enricher = DataEnrichment()
self.s3_file_counter = S3FileCounter()

def check_and_convert(self, data):
Expand Down Expand Up @@ -83,8 +83,8 @@ def enrich_data(self, data, selected_fields, record_count):
enriched_entry = {}
for key, value in entry.items():
if isinstance(value, str) and (key in selected_fields):
enriched_value = self.data_enricher.enrich_data(value, num_return_sequences=1, language_id='en')
# enriched_value = ["enrichupdate"]
# enriched_value = self.data_enricher.enrich_data(value, num_return_sequences=1, language_id='en')
enriched_value = ["enrichupdate"]
enriched_entry[key] = enriched_value[0] if enriched_value else value
else:
enriched_entry[key] = value
Expand Down

0 comments on commit 9d2f605

Please sign in to comment.