ML_LSTM_BTC / notebook_patch.py
dunkindonuts123
init: BitPredict Flask app
5b83981
Raw
History Blame Contribute Delete
1.2 kB
# ─────────────────────────────────────────────────────────────
# NOTEBOOK PATCH β€” add this cell RIGHT AFTER Step 4 (fit scaler)
# in BitPredict_LSTM_2026.ipynb
# ─────────────────────────────────────────────────────────────
import joblib, os
os.makedirs('model', exist_ok=True)
# Save scaler (REQUIRED for Flask backend)
joblib.dump(scaler, 'model/scaler.pkl')
print("βœ… scaler saved β†’ model/scaler.pkl")
# ─────────────────────────────────────────────────────────────
# STEP 10 PATCH β€” change the model.save path to the model/ folder
# ─────────────────────────────────────────────────────────────
model.save('model/bitpredict_lstm_2026.h5')
print("βœ… model saved β†’ model/bitpredict_lstm_2026.h5")