saibhossain commited on
Commit
baaeb0a
Β·
1 Parent(s): e494bd7
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -68,11 +68,18 @@ 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
- try:
72
- lstm_model = load_model(LSTM_PATH, compile=True)
73
- print("βœ… LSTM model loaded:", LSTM_PATH)
74
- except Exception:
75
- lstm_model = None
 
 
 
 
 
 
 
76
 
77
 
78
  # ----------------------------
 
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=False)
75
+ print("βœ… LSTM model loaded successfully from", LSTM_PATH)
76
+ except Exception as e:
77
+ print("❌ LSTM load failed:", e)
78
+ raise # <--- re-raise so we see full traceback in logs
79
+ else:
80
+ print("❌ LSTM model file not found at", LSTM_PATH)
81
+ else:
82
+ print("❌ TensorFlow not available in this Space")
83
 
84
 
85
  # ----------------------------