Spaces:
Runtime error
Runtime error
Download src/models/predict_model.py from Logisx/EssayEvaluation: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/spaces/Logisx/EssayEvaluation/resolve/main/src/models/predict_model.py
- Command line
-
hf download hf://spaces/Logisx/EssayEvaluation/src/models/predict_model.py
-
curl -L -o predict_model.py https://huggingface.co/spaces/Logisx/EssayEvaluation/resolve/main/src/models/predict_model.py
586 Bytes
| # -*- coding: utf-8 -*- | |
| from src.logging import logger | |
| from src.models.pipeline.prediction import ModelPredictionPipeline | |
| from src.models.configuration import ConfigurationManager | |
| class PredictionPipeline: | |
| def __init__(self): | |
| pass | |
| def predict(self, query): | |
| """ Run model prediction pipeline """ | |
| try: | |
| model_prediction_pipeline = ModelPredictionPipeline() | |
| output = model_prediction_pipeline.main(query) | |
| return output | |
| except Exception as e: | |
| logger.exception(e) | |
| raise e | |