I have to reload a Streamlit chart every 5 seconds, in order to visualize the new data in a XLSX report. How to achieve this?
import streamlit as st
import pandas as pd
import os
mainDir = os.path.dirname(__file__)
filePath = os.path.join(mainDir, "sources\\test.xlsx")
df = pd.read_excel(filePath)
option1 = 'Product'
option2 = 'Quantity'
df = df[[option1, option2]].set_index(option1)
st.write('Product Quantity')
st.area_chart(df)