Add1E commited on
Commit
8767759
·
verified ·
1 Parent(s): 1a8f11d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -301,15 +301,15 @@ st.sidebar.image(img)
301
 
302
  # Now, you can safely use st.session_state['selected_option']
303
  # Selectbox to choose a country
304
- selected_country = st.sidebar.selectbox("Choose a Country", ["AT"])#, "DE"
305
  feed_url1 = f'https://trends.google.de/trends/trendingsearches/daily/rss?geo={selected_country}'
306
 
307
  # Button to trigger actions
308
  if st.sidebar.button("Change Country"):
309
  if selected_country == "AT":
310
  st.session_state["pn"] = selected_country
311
- # elif selected_country == "DE":
312
- # st.session_state["pn"] = selected_country
313
 
314
  selected_option = st.sidebar.radio("Choose an option", ["Realzeit Anfragen", "Tagesaktuelle Anfragen", "Trends von Gestern"])
315
  st.warning("Die aufgelisteten Keywörter für erhöhte Reichweite in den Überschriften verwenden")
@@ -327,7 +327,7 @@ elif selected_option == "Realzeit Anfragen":
327
  # st.session_state["base_load_finished"] = True
328
  #auswahl = st.selectbox("Select Ressort", choices_list)
329
 
330
- display_articles_for_category(st.session_state["pn"])
331
  elif selected_option == "Trends von Gestern":
332
  display_trends_from_yesterday()
333
 
 
301
 
302
  # Now, you can safely use st.session_state['selected_option']
303
  # Selectbox to choose a country
304
+ selected_country = st.sidebar.selectbox("Choose a Country", ["AT", "DE"])
305
  feed_url1 = f'https://trends.google.de/trends/trendingsearches/daily/rss?geo={selected_country}'
306
 
307
  # Button to trigger actions
308
  if st.sidebar.button("Change Country"):
309
  if selected_country == "AT":
310
  st.session_state["pn"] = selected_country
311
+ elif selected_country == "DE":
312
+ st.session_state["pn"] = selected_country
313
 
314
  selected_option = st.sidebar.radio("Choose an option", ["Realzeit Anfragen", "Tagesaktuelle Anfragen", "Trends von Gestern"])
315
  st.warning("Die aufgelisteten Keywörter für erhöhte Reichweite in den Überschriften verwenden")
 
327
  # st.session_state["base_load_finished"] = True
328
  #auswahl = st.selectbox("Select Ressort", choices_list)
329
 
330
+ display_articles_for_category(selected_country)
331
  elif selected_option == "Trends von Gestern":
332
  display_trends_from_yesterday()
333