Spaces:
Sleeping
Sleeping
import streamlit as st | |
import pandas as pd | |
import os | |
from PIL import Image | |
st.title('Price Forecasting - Crude Oil Futures') | |
st.subheader('This page is not interactive - only for prototype purposes*') | |
st.text('*Due to not having access to GPU for cloud computation yet.') | |
st.header('Univariate Forecasting with Exogenous Predictors') | |
col1, col2, col3 = st.columns(3) | |
uni_df = pd.read_csv(os.path.join('price_forecasting_ml', | |
'artifacts', | |
'crude_oil_8998a364-2ecc-483d-8079-f04d455b4522', | |
'train_data.csv')).drop(columns=['Unnamed: 0']) | |
with col1: | |
horizon_uni = st.text_input('Univariate Forecasting Horizon') | |
with col2: | |
target_uni = st.multiselect('Univariate Target Variable', uni_df.columns | |
,default='y') | |
with col3: | |
agg_uni = st.selectbox('Univariate Data Aggregation', | |
['Daily', 'Weekly', 'Monthly', 'Yearly']) | |
st.dataframe(uni_df) | |
img1 = Image.open(os.path.join('price_forecasting_ml', | |
'artifacts', | |
'crude_oil_8998a364-2ecc-483d-8079-f04d455b4522', | |
'forecast_plot.jpg')) | |
st.image(img1, caption="Crude Oil Futures Price Forecasting - Univariate with Exogenous Features (Horizon = 5)") | |
st.markdown("---") | |
st.header('Multivariate Forecasting') | |
col4, col5, col6 = st.columns(3) | |
multi_df = pd.read_csv(os.path.join('price_forecasting_ml', | |
'artifacts', | |
'crude_oil_df1ce299-117d-43c7-bcd5-7ecaeac0bc89', | |
'train_data.csv')).drop(columns=['Unnamed: 0']) | |
with col4: | |
horizon_multi = st.text_input('Multivariate Forecasting Horizon') | |
with col5: | |
target_multi = st.multiselect('Multivariate Target Variable', multi_df.columns | |
,default='y') | |
with col6: | |
agg_multi = st.selectbox('Multivariate Data Aggregation', | |
['Daily', 'Weekly', 'Monthly', 'Yearly']) | |
st.dataframe(multi_df) | |
img2 = Image.open(os.path.join('price_forecasting_ml', | |
'artifacts', | |
'crude_oil_df1ce299-117d-43c7-bcd5-7ecaeac0bc89', | |
'forecast_plot.jpg')) | |
st.image(img2, caption="Crude Oil Futures Price Forecasting - Multivariate (Horizon = 5)") | |