saibhossain commited on
Commit
5992cc1
·
1 Parent(s): 9dc17f6
Files changed (2) hide show
  1. app.py +4 -2
  2. requirements.txt +1 -2
app.py CHANGED
@@ -33,7 +33,7 @@ except Exception:
33
  # ----------------------------
34
  # Load data & artifacts
35
  # ----------------------------
36
- DATA_PATH = "data/AAPL_stock_2015_2025.csv"
37
  df = pd.read_csv(DATA_PATH)
38
  df["Date"] = pd.to_datetime(df["Date"])
39
  df = df.sort_values("Date").set_index("Date")
@@ -67,8 +67,10 @@ if PROPHET_AVAILABLE and os.path.exists(PROPHET_PATH):
67
  prophet_model = None
68
 
69
  if TENSORFLOW_AVAILABLE and os.path.exists(LSTM_PATH):
 
70
  try:
71
  lstm_model = load_model(LSTM_PATH, compile=False)
 
72
  except Exception:
73
  lstm_model = None
74
 
@@ -307,7 +309,7 @@ def do_backtest(test_days, arima, prophet, lstm):
307
 
308
 
309
  with gr.Blocks(title="DataSynthis_ML_JobTask") as demo:
310
- gr.Markdown("# 📈 Multivariate Stock Forecasting (AAPL)\nCompare ARIMA, Prophet, and LSTM.")
311
  with gr.Tab("Forecast"):
312
  with gr.Row():
313
  horizon = gr.Slider(7, 90, value=30, step=1, label="Forecast horizon (days)")
 
33
  # ----------------------------
34
  # Load data & artifacts
35
  # ----------------------------
36
+ DATA_PATH = "AAPL_stock_2015_2025.csv"
37
  df = pd.read_csv(DATA_PATH)
38
  df["Date"] = pd.to_datetime(df["Date"])
39
  df = df.sort_values("Date").set_index("Date")
 
67
  prophet_model = None
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=False)
73
+ print("✅ LSTM model loaded:", LSTM_PATH)
74
  except Exception:
75
  lstm_model = None
76
 
 
309
 
310
 
311
  with gr.Blocks(title="DataSynthis_ML_JobTask") as demo:
312
+ gr.Markdown("# Multivariate Stock Forecasting (AAPL)\nCompare ARIMA, Prophet, and LSTM.")
313
  with gr.Tab("Forecast"):
314
  with gr.Row():
315
  horizon = gr.Slider(7, 90, value=30, step=1, label="Forecast horizon (days)")
requirements.txt CHANGED
@@ -10,5 +10,4 @@ ujson==5.10.0
10
  tensorflow-cpu==2.12.0
11
  joblib==1.4.2
12
  tqdm==4.67.1
13
- seaborn==0.12.2
14
- tensorflow==2.12.0
 
10
  tensorflow-cpu==2.12.0
11
  joblib==1.4.2
12
  tqdm==4.67.1
13
+ seaborn==0.12.2