Streamlit not updating the app.py code and showing blank page

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. I am running your app locally

  2. link to your app’s public GitHub repository (including a [requirements file] → Olympic-analysis/app.py at main · Shekhar-Raj/Olympic-analysis · GitHub(https://docs.streamlit.io/streamlit-cloud/get-started/deploy-an-app/app-dependencies)).

  3. Share the full text of the error message (not a screenshot).

  4. Python version → 3.12.1
    Streamlit, version 1.30.0

import streamlit as st
import pandas as pd
import preprocessor,helper

def main():

    df = pd.read_csv('athlete_events.csv')
    region_df = pd.read_csv('noc_regions.csv')

    df = preprocessor.preprocess(df, region_df)

    user_menu = st.sidebar.radio(
        'Select an Option',
        ('Medal Tally','Overall Analysis','Country-wise Analysis','Athlete wise Analysis')
    )


    if user_menu == 'Medal tally':
        st.header("Medal Tally")
        years, country = helper.country_year_list(df)
        selected_year = st.sidebar.selectbox("Select Year",years)
        selected_country = st.sidebar.selectbox("Select Country", country)

        medal_tally = helper.medal_tally(df)
        st.dataframe(medal_tally)

if __name__ == "__main__":
  main()
```[quote="shekhar_421, post:1, topic:60830, full:true"]

i am running the app locally
github link of code --> https://github.com/Shekhar-Raj/Olympic-analysis/blob/main/app.py
python --> 3.12.1
streamlit version -->1.30.0
![error image|690x388](upload://vjFth7Nc6RHuzZZsU2ZMuspOjdw.jpeg)

import streamlit as st
import pandas as pd
import preprocessor,helper

def main():

    df = pd.read_csv('athlete_events.csv')
    region_df = pd.read_csv('noc_regions.csv')

    df = preprocessor.preprocess(df, region_df)

    user_menu = st.sidebar.radio(
        'Select an Option',
        ('Medal Tally','Overall Analysis','Country-wise Analysis','Athlete wise Analysis')
    )


    if user_menu == 'Medal tally':
        st.header("Medal Tally")
        years, country = helper.country_year_list(df)
        selected_year = st.sidebar.selectbox("Select Year",years)
        selected_country = st.sidebar.selectbox("Select Country", country)

        medal_tally = helper.medal_tally(df)
        st.dataframe(medal_tally)

if __name__ == "__main__":
  main()

Hi @shekhar_421 , in your first radio option you are again mentioning about st.sidebar.selectbox widget. So streamlit is getting overriding the the above st sidebar and this sidebar. Just remove sidebar from first radio option. I mean use st.selectbox like that.

Happy Streamlit-ing :balloon: