Simulator-UOPX / pages /1_Model_Quality.py
Pragya Jatav
aesthetic changes 1
f4e26b8
raw
history blame
1.41 kB
import streamlit as st
import pandas as pd
import numpy as np
import plotly.express as px
import Streamlit_functions as sf
import response_curves_model_quality_base as rc1
st.set_page_config(
layout="wide"
)
st.header("Model Quality")
# st.write("MMM Model Quality")
st.plotly_chart(sf.mmm_model_quality(),use_container_width=True)
media_df = sf.media_data()
# Create two columns for start date and end date input
col1, col2 = st.columns(2)
st.dataframe(sf.model_metrics_table_func(),hide_index = True,use_container_width=True)
with col1:
st.plotly_chart(sf.elasticity(media_df))
with col2:
st.plotly_chart(sf.half_life(media_df))
# Dropdown menu options
options = [
'Broadcast TV',
'Cable TV',
'Connected & OTT TV',
'Display Prospecting',
'Display Retargeting',
'Video',
'Social Prospecting',
'Social Retargeting',
'Search Brand',
'Search Non-brand',
'Digital Partners',
'Audio',
'Email']
options1 = [
'View Line Plot',
'View Scattered Plot',
"View Both"]
col1, col2 = st.columns(2)
# Create a dropdown menu
with col1:
selected_option = st.selectbox('Select A Media Channel:', options)
selected_option2 = st.selectbox('Select A Chart Type', options1)
# Display the selected option
with col2:
st.write("")
st.plotly_chart(rc1.response_curves(selected_option,selected_option2))