Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/flexingdata/testing
Browse files12345456789101112131415161718192021222324252627282930313233349 unmodified lines444546474849505152535455566 unmodified lines63646566676869import streamlit as stimport urllib.parse
# Safe config setupst.set_page_config(page_title="Gen Z vs Millennial Quiz", page_icon="🤖", layout="centered")# ==== 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 lines st.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)
# Share 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)genz.py+25-2