Roberta2024 commited on
Commit
b3daefd
·
verified ·
1 Parent(s): 7fe36db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -42,11 +42,11 @@ st.markdown("""
42
  """, unsafe_allow_html=True)
43
  st.markdown('<p class="big-font">ESG 數據視覺化</p>', unsafe_allow_html=True)
44
 
45
- # Sidebar for data selection and chart options
46
  st.sidebar.header("設置")
47
  selected_option = st.sidebar.selectbox("選擇資料類型", options=list(urls.keys()))
48
 
49
- # Main content area
50
  if st.sidebar.button("載入資料"):
51
  with st.spinner('資料載入中...'):
52
  # Add a progress bar
@@ -101,6 +101,8 @@ if st.sidebar.button("載入資料"):
101
  file_name=f"{selected_option}_data.csv",
102
  mime="text/csv",
103
  )
 
 
104
 
105
  # Footer
106
  st.markdown("---")
 
42
  """, unsafe_allow_html=True)
43
  st.markdown('<p class="big-font">ESG 數據視覺化</p>', unsafe_allow_html=True)
44
 
45
+ # Sidebar for data selection
46
  st.sidebar.header("設置")
47
  selected_option = st.sidebar.selectbox("選擇資料類型", options=list(urls.keys()))
48
 
49
+ # Button to load data
50
  if st.sidebar.button("載入資料"):
51
  with st.spinner('資料載入中...'):
52
  # Add a progress bar
 
101
  file_name=f"{selected_option}_data.csv",
102
  mime="text/csv",
103
  )
104
+ else:
105
+ st.info("請在左側選單選擇資料類型,然後點擊「載入資料」按鈕來查看數據。")
106
 
107
  # Footer
108
  st.markdown("---")