Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/flexingdata/testing
Browse files12345678910111213149 unmodified lines24252627282930313233346 unmodified lines414243444546import streamlit as stimport urllib.parse# Safe config setupst.set_page_config(page_title="Gen Z vs Millennial Quiz", page_icon="๐ค", layout="centered")st.title("โจ How Gen Z / Millennial Are You?")st.markdown("Answer these fun questions to find out your vibe!")score = 0questions = [("Whatโs your go-to way of laughing online?", ["๐", "๐", "Lmao / lol", "Voice note of laughing"], [1, 2, 1, 2]),("Your reaction to a missed call:", ["Panic & text", "Call back", "Wait 2 days", "Block them"], [1, 2, 2, 3]),9 unmodified lines("Most like you:", ["Adulting is hard", "Main character energy", "Vibe check failed", "Nap and snack"], [1, 2, 2, 2])]for i, (q, opts, points) in enumerate(questions):st.subheader(f"Q{i+1}. {q}")choice = st.radio("Choose an option", opts, key=i, label_visibility="collapsed")score += points[opts.index(choice)]if st.button("๐ Reveal My Result"):st.markdown("---")if score >= 22:6 unmodified linesst.warning("๐ Youโre More Millennial Vibes โ Emo songs, Facebook memories, and semi-adulting life.")st.markdown('<img src="https://media.giphy.com/media/l0MYC0LajbaPoEADu/giphy.gif" width="250">', unsafe_allow_html=True)st.markdown("### Share your result:")share_text = "I just took the Gen Z vs Millennial quiz! Find out your vibe here: https://ai.flexingdata.com"encoded_text = urllib.parse.quote(share_text)123456789101112131415161718192021222324252627282930313233349 unmodified lines444546474849505152535455566 unmodified lines63646566676869import streamlit as stimport urllib.parse# ==== PAGE CONFIGURATION ====st.set_page_config(page_title="Gen Z vs Millennial Quiz",page_icon="๐ค",layout="centered",menu_items={"Get Help": None,"Report a bug": None,"About": None})# ==== HIDE STREAMLIT UI ====st.markdown("""<style>#MainMenu {visibility: hidden;}footer {visibility: hidden;}header {visibility: hidden;}</style>""", unsafe_allow_html=True)# ==== QUIZ TITLE ====st.title("โจ How Gen Z / Millennial Are You?")st.markdown("Answer these fun questions to find out your vibe!")score = 0# ==== QUESTIONS ====questions = [("Whatโs your go-to way of laughing online?", ["๐", "๐", "Lmao / lol", "Voice note of laughing"], [1, 2, 1, 2]),("Your reaction to a missed call:", ["Panic & text", "Call back", "Wait 2 days", "Block them"], [1, 2, 2, 3]),9 unmodified lines("Most like you:", ["Adulting is hard", "Main character energy", "Vibe check failed", "Nap and snack"], [1, 2, 2, 2])]# ==== QUIZ FORM ====for i, (q, opts, points) in enumerate(questions):st.subheader(f"Q{i+1}. {q}")choice = st.radio("Choose an option", opts, key=i, label_visibility="collapsed")score += points[opts.index(choice)]# ==== RESULT ====if st.button("๐ Reveal My Result"):st.markdown("---")if score >= 22:6 unmodified linesst.warning("๐ Youโre More Millennial Vibes โ Emo songs, Facebook memories, and semi-adulting life.")st.markdown('<img src="https://media.giphy.com/media/l0MYC0LajbaPoEADu/giphy.gif" width="250">', unsafe_allow_html=True)# Sharest.markdown("### Share your result:")share_text = "I just took the Gen Z vs Millennial quiz! Find out your vibe here: https://ai.flexingdata.com"encoded_text = urllib.parse.quote(share_text)
genz.py+25-2