Download app/utils/predict.py from amos-fernandes/DeepFin: direct link, hf CLI and curl.
- Browser
- Download file 328 Bytes
-
https://huggingface.co/amos-fernandes/DeepFin/resolve/main/app/utils/predict.py
- Command line
-
hf download hf://amos-fernandes/DeepFin/app/utils/predict.py
-
curl -L -o predict.py https://huggingface.co/amos-fernandes/DeepFin/resolve/main/app/utils/predict.py
328 Bytes
| import numpy as np | |
| import tensorflow as tf | |
| from app.model.preprocess import preprocess_input_data | |
| model = tf.keras.models.load_model("app/model/model.h5") | |
| def predict_quality(raw_data): | |
| processed = preprocess_input_data(raw_data) | |
| preds = model.predict(processed) | |
| return [int(p > 0.5) for p in preds] | |