Spaces:
Sleeping
Sleeping
Commit Β·
851a534
1
Parent(s): 1fd22ad
update 3
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ from sklearn.metrics import mean_squared_error, mean_absolute_percentage_error
|
|
| 13 |
|
| 14 |
import joblib
|
| 15 |
from statsmodels.tsa.arima.model import ARIMA
|
|
|
|
| 16 |
|
| 17 |
# Prophet can be heavy; we load lazily inside functions to avoid slow import on startup
|
| 18 |
try:
|
|
@@ -71,7 +72,7 @@ if TENSORFLOW_AVAILABLE:
|
|
| 71 |
print("π Checking for LSTM model at:", 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")
|
| 76 |
except Exception as e:
|
| 77 |
print("β LSTM load failed:", e)
|
|
|
|
| 13 |
|
| 14 |
import joblib
|
| 15 |
from statsmodels.tsa.arima.model import ARIMA
|
| 16 |
+
from tensorflow import keras
|
| 17 |
|
| 18 |
# Prophet can be heavy; we load lazily inside functions to avoid slow import on startup
|
| 19 |
try:
|
|
|
|
| 72 |
print("π Checking for LSTM model at:", LSTM_PATH)
|
| 73 |
if os.path.exists(LSTM_PATH):
|
| 74 |
try:
|
| 75 |
+
lstm_model = keras.models.load_model(LSTM_PATH, compile=False)
|
| 76 |
print("β
LSTM model loaded successfully")
|
| 77 |
except Exception as e:
|
| 78 |
print("β LSTM load failed:", e)
|