Spaces:
Sleeping
Sleeping
from textsummarizer.pipeline.stage_01_data_ingestion import DataIngestionPipeline | |
from textsummarizer.pipeline.stage_02_data_validation import DataValidationPipeline | |
from textsummarizer.pipeline.stage_03_data_transformation import DataTransformationPipeline | |
from textsummarizer.pipeline.stage_04_model_trainer import ModelTrainerPipeline | |
from textsummarizer.pipeline.stage_05_model_evaluation import ModelEvaluationPipeline | |
from textsummarizer.logging import logger | |
STAGE_NAME = "Data Ingestion stage" | |
try: | |
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") | |
data_ingestion = DataIngestionPipeline() | |
data_ingestion.main() | |
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x") | |
except Exception as e: | |
logger.exception(e) | |
raise e | |
STAGE_NAME = "Data Validation stage" | |
try: | |
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") | |
data_validation = DataValidationPipeline() | |
data_validation.main() | |
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x") | |
except Exception as e: | |
logger.exception(e) | |
raise e | |
STAGE_NAME = "Data Trnasformation stage" | |
try: | |
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") | |
data_transformaion = DataTransformationPipeline() | |
data_transformaion.main() | |
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x") | |
except Exception as e: | |
logger.exception(e) | |
raise e | |
STAGE_NAME = "Model Traniner stage" | |
try: | |
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") | |
model_tranier = ModelTrainerPipeline() | |
model_tranier.main() | |
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x") | |
except Exception as e: | |
logger.exception(e) | |
raise e | |
STAGE_NAME = "Model Evaluation stage" | |
try: | |
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") | |
model_evaluation = ModelEvaluationPipeline() | |
model_evaluation.main() | |
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x") | |
except Exception as e: | |
logger.exception(e) | |
raise e |