Spaces:
Sleeping
Sleeping
Download python_backend/src/CodeRunAndModelTrain/pipelines/ModelTrainPipeline.py from VashuTheGreat2/ML-Learner: direct link, hf CLI and curl.
- Browser
- Download file 541 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/python_backend/src/CodeRunAndModelTrain/pipelines/ModelTrainPipeline.py
- Command line
-
hf download hf://spaces/VashuTheGreat2/ML-Learner/python_backend/src/CodeRunAndModelTrain/pipelines/ModelTrainPipeline.py
-
curl -L -o ModelTrainPipeline.py https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/python_backend/src/CodeRunAndModelTrain/pipelines/ModelTrainPipeline.py
541 Bytes
| from src.CodeRunAndModelTrain.components.modelTrain import TrainController | |
| from src.CodeRunAndModelTrain.models.model_train_models import Train as TrainSchema | |
| from utils.asyncHandler import asyncHandler | |
| from src.CodeRunAndModelTrain.utils.Abstract import Pipeline | |
| class ModelTrainPipeline(Pipeline): | |
| def __init__(self): | |
| self.train_controller=TrainController() | |
| pass | |
| async def initiate(self,schema:TrainSchema): | |
| res=await self.train_controller.train(schema=schema) | |
| return res | |