fschwartzer's picture
Update app.py
a268f6c
raw
history blame
No virus
1.32 kB
import streamlit as st
import pandas as pd
df = pd.read_csv('last_results.csv')
title_html = """
<style>
@font-face {font-family: 'Quicksand';
src: url('font/Quicksand-VariableFont_wght.ttf') format('truetype');
}
body {{
font-family: 'Quicksand', sans-serif;
}}
</style>
<span style='color: red; font-size: 30px;'>PREVISÕES DE RECEITAS</span>
"""
# Set a fixed width for the sidebar
st.markdown(
"""
<style>
.sidebar .sidebar-content {
width: 300px;
}
</style>
""",
unsafe_allow_html=True
)
with st.sidebar:
st.markdown(title_html, unsafe_allow_html=True)
selected_instituicao = st.selectbox('Select Instituição', df['Instituição'].unique())
selected_conta = st.selectbox('Select Conta', df['Conta'].unique())
# Filter the DataFrame based on selected values
filtered_df = df[(df['Instituição'] == selected_instituicao) & (df['Conta'] == selected_conta)]
# Display the filtered DataFrame
st.write('Filtered DataFrame:')
st.write(filtered_df)
# Display the Forecasts values
if not filtered_df.empty:
forecasts_values = filtered_df['Forecasts'].values
st.write('Forecasts Values:', forecasts_values)
else:
st.warning('No data available for the selected filters.')