saibhossain commited on
Commit
73523bb
Β·
1 Parent(s): 8a13c49

update new model

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -68,16 +68,14 @@ if PROPHET_AVAILABLE and os.path.exists(PROPHET_PATH):
68
 
69
  if TENSORFLOW_AVAILABLE and os.path.exists(LSTM_PATH):
70
  print("βœ… TensorFlow imported successfully")
71
- print("πŸ”Ž Checking for LSTM model at:", os.path.abspath(LSTM_PATH))
72
- if os.path.exists(LSTM_PATH):
73
- try:
74
- lstm_model = load_model(LSTM_PATH, compile=True)
75
- print("βœ… LSTM model loaded successfully from", LSTM_PATH)
76
- except Exception:
77
- print("❌ LSTM load failed:", e)
78
- lstm_model = None
79
- else:
80
- print("❌ LSTM model file not found at", LSTM_PATH)
81
 
82
  # ----------------------------
83
  # Helpers
 
68
 
69
  if TENSORFLOW_AVAILABLE and os.path.exists(LSTM_PATH):
70
  print("βœ… TensorFlow imported successfully")
71
+ try:
72
+ model = load_model("lstm_model.h5", compile=False)
73
+ model.save("lstm_savedmodel", save_format="tf")
74
+ lstm_model = load_model("models/lstm_savedmodel", compile=False)
75
+ print("βœ… LSTM model loaded:", LSTM_PATH)
76
+ except Exception:
77
+ lstm_model = None
78
+
 
 
79
 
80
  # ----------------------------
81
  # Helpers