Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import pandas as pd | |
| df = pd.read_csv("dummy_data.csv") | |
| # UI layout | |
| st.title(" CGD Survey Explorer (PoC)") | |
| st.sidebar.header("๐ Filter Questions") | |
| selected_country = st.sidebar.selectbox("Select Country", sorted(df["Country"].unique())) | |
| selected_year = st.sidebar.selectbox("Select Year", sorted(df["Year"].unique())) | |
| keyword = st.sidebar.text_input("Keyword Search", "") | |
| filtered = df[ | |
| (df["Country"] == selected_country) & | |
| (df["Year"] == selected_year) & | |
| (df["Question"].str.contains(keyword, case=False, na=False)) | |
| ] | |
| st.markdown(f"### Results for **{selected_country}** in **{selected_year}**") | |
| st.dataframe(filtered[["Variable", "Question", "Responses"]]) | |
| if filtered.empty: | |
| st.info("No matching questions found.") | |
| # this is jut me testing if streamlit works | |
| import streamlit as st | |
| st.title("โ Hello from Streamlit!") | |
| st.write("This is a test to confirm the app runs.") | |