Roozeec's picture
Added settings
bcfdcee
raw
history blame
431 Bytes
import streamlit as st
import wna_googlenews as wna
st.title("WNA Google News App")
st.subheader("Search for News")
# create a dropdown menu for selecting days range
days_range = st.selectbox("Select Days Range", ["1d", "7", "30d"])
query = st.text_input("Enter Query")
settings = {
"lang": "fr",
"region": "FR",
"period": days_range
}
if st.button("Search"):
df = wna.get_news(settings, query)
st.dataframe(df)