cupid-app / swipe.py
rivapereira123's picture
Upload 11 files
776ccc0 verified
import streamlit as st
# Mock profiles
profiles = [
{
"name": "Alex",
"image": "https://randomuser.me/api/portraits/men/32.jpg",
"match": "92%",
"sentiment": "😊",
"reason": "You both love nature walks and deep chats.",
},
{
"name": "Sophia",
"image": "https://randomuser.me/api/portraits/women/74.jpg",
"match": "88%",
"sentiment": "😊",
"reason": "You're both optimists and enjoy outdoor activities.",
},
{
"name": "Olivia",
"image": "https://randomuser.me/api/portraits/women/15.jpg",
"match": "92%",
"sentiment": "😊",
"reason": "You're both empathetic and passionate about helping others.",
},
{
"name": "Ethan",
"image": "https://randomuser.me/api/portraits/men/63.jpg",
"match": "78%",
"sentiment": "😐",
"reason": "You both love to travel and enjoy trying new foods.",
},
]
st.set_page_config(page_title="Cupid AI Swipe", page_icon="πŸ’˜")
st.title("πŸ’˜ Cupid AI: Swipe for Matches")
# Initialize swipe index
if "index" not in st.session_state:
st.session_state.index = 0
index = st.session_state.index
if index < len(profiles):
profile = profiles[index]
st.image(profile["image"], width=250)
st.markdown(f"### {profile['name']} β€” {profile['match']} match")
st.write(f"{profile['reason']}")
st.write(f"Sentiment: {profile['sentiment']}")
col1, col2 = st.columns(2)
if col1.button("πŸ‘Ž Nope"):
st.session_state.index += 1
if col2.button("πŸ’˜ Like"):
st.session_state.index += 1
else:
st.markdown("### No more profiles!")
st.balloons()