nickmuchi commited on
Commit
9e36058
·
verified ·
1 Parent(s): 77fc580

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -66,16 +66,19 @@ if latest_ep_button:
66
 
67
  # Dropdown box
68
  st.sidebar.subheader("Available Podcasts Feeds")
69
- selected_podcast = st.sidebar.selectbox("Select Podcast", options=podcast_five_titles,index=None)
70
 
71
  if selected_podcast:
72
 
 
 
 
73
  print(selected_podcast)
74
 
75
  st.sidebar.markdown("**Note**: Podcast processing can take upto 5 mins, please be patient.")
76
 
77
- podcast_link = pods[selected_podcast][0]
78
- podcast_image = pods[selected_podcast][1]
79
 
80
  # Right section - Newsletter content
81
  st.header("Newsletter Content")
 
66
 
67
  # Dropdown box
68
  st.sidebar.subheader("Available Podcasts Feeds")
69
+ selected_podcast = st.sidebar.selectbox("Select Podcast", options=podcast_five_titles,index=None,key='podcast_selection')
70
 
71
  if selected_podcast:
72
 
73
+ if 'podcast_selection' not in st.session_state:
74
+ st.session_state.podcast_selection = selected_podcast
75
+
76
  print(selected_podcast)
77
 
78
  st.sidebar.markdown("**Note**: Podcast processing can take upto 5 mins, please be patient.")
79
 
80
+ podcast_link = pods[st.session_state.podcast_selection][0]
81
+ podcast_image = pods[st.session_state.podcast_selection][1]
82
 
83
  # Right section - Newsletter content
84
  st.header("Newsletter Content")