Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
from datetime import date
|
3 |
import yfinance as yf
|
4 |
-
from
|
5 |
-
from
|
6 |
from plotly import graph_objs as go
|
7 |
|
8 |
# Constants for date range
|
@@ -20,7 +20,7 @@ selected_stock = st.selectbox('Select dataset for prediction', stocks)
|
|
20 |
n_years = st.slider('Years of prediction:', 1, 4)
|
21 |
period = n_years * 365
|
22 |
|
23 |
-
@st.
|
24 |
def load_data(ticker):
|
25 |
"""Load stock data from Yahoo Finance."""
|
26 |
data = yf.download(ticker, START, TODAY)
|
|
|
1 |
import streamlit as st
|
2 |
from datetime import date
|
3 |
import yfinance as yf
|
4 |
+
from prophet import Prophet # Changed from fbprophet to prophet
|
5 |
+
from prophet.plot import plot_plotly
|
6 |
from plotly import graph_objs as go
|
7 |
|
8 |
# Constants for date range
|
|
|
20 |
n_years = st.slider('Years of prediction:', 1, 4)
|
21 |
period = n_years * 365
|
22 |
|
23 |
+
@st.cache_data
|
24 |
def load_data(ticker):
|
25 |
"""Load stock data from Yahoo Finance."""
|
26 |
data = yf.download(ticker, START, TODAY)
|