Spaces:
Sleeping

File size: 3,427 Bytes
3c7718e
ba2a24e
934b89e
caff227
 
 
 
 
 
 
 
 
 
 
ba2a24e
caff227
 
 
 
 
 
 
 
 
 
3c7718e
 
934b89e
3c7718e
934b89e
caff227
3c7718e
 
 
 
 
 
 
 
 
 
 
 
 
 
934b89e
caff227
3c7718e
 
ba2a24e
3c7718e
 
caff227
3c7718e
 
 
 
ba2a24e
3c7718e
 
ba2a24e
3c7718e
 
ba2a24e
3c7718e
caff227
ba2a24e
3c7718e
ba2a24e
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import streamlit as st
import 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]),
    ("How do you take selfies?", ["Front camera only", "Tripod", "Don’t take selfies", "Snapchat filters"], [1, 2, 1, 3]),
    ("Phone at 1% battery:", ["Plug in", "Accept fate", "Low power mode", "Cry"], [1, 2, 1, 2]),
    ("Which of these do you still use?", ["Facebook", "Instagram", "TikTok", "Email only"], [0, 1, 2, 1]),
    ("Ideal vacation:", ["Solo trip", "Food tour", "Photoshoot", "Stay at home"], [1, 2, 2, 0]),
    ("Favorite texting style:", ["all lowercase", "With punctuation", "No punc", "ALL CAPS"], [2, 1, 1, 2]),
    ("2000s song plays:", ["Cry a little", "Sing loudly", "Post it", "Ask what song?"], [1, 1, 2, 0]),
    ("Choose your cringe:", ["TikToks", "LinkedIn posts", "WhatsApp forwards", "Old FB posts"], [2, 1, 0, 1]),
    ("Current wallpaper:", ["My pet", "A quote", "Black screen", "Celebrity crush"], [1, 1, 2, 2]),
    ("Group chat vibe:", ["Silent", "Memes", "Venting", "Voice notes"], [0, 2, 1, 2]),
    ("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:
        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)

    # 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)
    whatsapp_url = f"https://wa.me/?text={encoded_text}"
    st.markdown(f"[📲 Share on WhatsApp]({whatsapp_url})", unsafe_allow_html=True)