Spaces:
Sleeping
Sleeping
LearnwithShashank commited on
Commit Β·
ba2a24e
1
Parent(s): 83e79f3
12345616 unmodified lines23242526272829303132333435363738394041import streamlit as stst.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!")16 unmodified linesfor i, (q, opts, points) in enumerate(questions):st.subheader(f"Q{i+1}. {q}")choice = st.radio("", opts, key=i)score += points[opts.index(choice)]if st.button("π Reveal My Result"):st.markdown("---")if score >= 22:st.success("π You're Pure Gen Z! π You speak in memes, fear nothing, and run on iced coffee.")elif 14 <= score < 22:st.info("π Youβre a Chill Millennial-Z Hybrid! You love both avocado toast and TikToks.")else:st.warning("π Youβre More Millennial Vibes β Emo songs, Facebook memories, and semi-adulting life.")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"whatsapp_url = f"https://wa.me/?text={share_text.replace(' ', '%20')}"st.markdown(f"[π² Share on WhatsApp]({whatsapp_url})")1234567816 unmodified lines252627282930313233343536373839404142434445464748import streamlit as stimport urllib.parsest.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!")16 unmodified linesfor 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:st.success("π You're Pure Gen Z! π You speak in memes, fear nothing, and run on iced coffee.")st.markdown('<img src="https://media.giphy.com/media/ASd0Ukj0y3qMM/giphy.gif" width="250">', unsafe_allow_html=True)elif 14 <= score < 22:st.info("π Youβre a Chill Millennial-Z Hybrid! You love both avocado toast and TikToks.")st.markdown('<img src="https://media.giphy.com/media/l0Exk8EUzSLsrErEQ/giphy.gif" width="250">', unsafe_allow_html=True)else: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)# 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)whatsapp_url = f"https://wa.me/?text={encoded_text}"st.markdown(f"[π² Share on WhatsApp]({whatsapp_url})", unsafe_allow_html=True)
app.py+11-4