Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 176 additions & 2 deletions edsa_recommender.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"""
# Streamlit dependencies
import streamlit as st
import streamlit.components.v1 as components
import base64

# Data handling dependencies
import pandas as pd
Expand All @@ -39,19 +41,87 @@

# Data Loading
title_list = load_movie_titles('resources/data/movies.csv')

font_css = """
<style>
div[data-baseweb="tab-list"] {
background:rgba(246, 246, 246, 0.4);
padding: 0 5px 0 5px;
border-radius: 5px;
}

button[data-baseweb="tab"] > div[data-testid="stMarkdownContainer"] > p {
font-size: 18px;
}

button[data-baseweb="tab"] {
background: transparent
}

button[data-baseweb="tab"]:hover {
background: rgba(230, 230, 230, 0.4);
color: rgb(255, 255, 255)
}

div[data-baseweb="tab-highlight"] {
background: rgba(230, 230, 230, 0.4);
color: rgb(255, 255, 255)
}

button[data-baseweb="tab"]:active {
background: rgba(230, 230, 230, 0.4);
color: rgb(255, 255, 255)
}

div[data-testid="stExpander"] {
background:rgba(246, 246, 246, 0.4);
border-radius: 5px;
box-shadow: 2px 2px;
}

</style>
"""
st.markdown(font_css, unsafe_allow_html=True)

# App declaration
def main():

def add_bg_from_local(image_file):
with open(image_file, "rb") as image_file:
encoded_string = base64.b64encode(image_file.read())
st.markdown(
f"""
<style>
.stApp {{
background-image: url(data:image/{"jpg"};base64,{encoded_string.decode()});
background-size: cover
}}
</style>
""",
unsafe_allow_html=True
)

add_bg_from_local('C:/Users/44475/example2/resources/imgs/back.jpg')

with st.sidebar:
st.image("resources/imgs/Flix.png", width=200)
st.sidebar.title("Movie Recommendation System")
# DO NOT REMOVE the 'Recommender System' option below, however,
# you are welcome to add more options to enrich your app.
page_options = ["Recommender System","Solution Overview"]
page_options = ["Home","Recommender System","Analysis", "About Us","FlixWhiz Info", "Feedback"]

# -------------------------------------------------------------------
# ----------- !! THIS CODE MUST NOT BE ALTERED !! -------------------
# -------------------------------------------------------------------


page_selection = st.sidebar.selectbox("Choose Option", page_options)


if page_selection == "Recommender System":



# Header contents
st.write('# Movie Recommender Engine')
st.write('### EXPLORE Data Science Academy Unsupervised Predict')
Expand Down Expand Up @@ -100,13 +170,117 @@ def main():
# -------------------------------------------------------------------

# ------------- SAFE FOR ALTERING/EXTENSION -------------------

if page_selection == "Solution Overview":
st.title("Solution Overview")
st.write("Describe your winning approach on this page")



# -------------------------------------------------------------------

# ------------- SAFE FOR ALTERING/EXTENSION -------------------------




if page_selection == "Feedback":

st.image('resources/imgs/Feedback.jpg', width = 300)


# Creating a text box for user input
feedback_text = st.text_area("","Type Here:")

if st.button("Submit Feedback"):
st.info("Feedback Submitted...")
feedback_text = 'Type Here'

if page_selection == "Home":


st.title("The ultimate app for EVERY movie enthusiasts")
st.write("")
st.image('resources/imgs/movie_background.jpg',use_column_width=True)
st.write("")
st.write("FlixWhiz is the perfect app for all your movie recommendations. It gives you the freedom of choosing the perfect movie to watch without wrecking your brain. Input your 3 favourite movies and viola!!")
st.title("Plenty Movies For Everyone To Enjoy Anywhere, Anytime")


# Building out the about us page
if page_selection == "About Us":

#st.markdown(font_css, unsafe_allow_html=True)
tab1, tab2, tab3 = st.tabs(["Bits And Bytes Data Solutions", "Testimonials", "Contact Us"])

with tab1:
st.write("")
st.image('resources/imgs/Logo.jpg',width=300)
st.write("")
st.write("Welcome to FlixWhiz, the ultimate destination for movie enthusiasts. Our passion lies in providing personalized movie recommendations that cater to your unique tastes and preferences. With our advanced recommendation algorithms, we analyze your favorite movies, genres, and more to curate a tailored selection of films just for you.")
st.write("At FlixWhiz, we have a dedicated team of movie lovers and data scientists who are committed to enhancing your movie-watching experience. We continuously update our extensive movie database, refine our algorithms, and incorporate user feedback to ensure that our recommendations are accurate and satisfying.")
st.write("Discovering the perfect movie has never been easier. Whether you're in the mood for action, romance, comedy, or any other genre, FlixWhiz is here to guide you. Join us on this cinematic journey and let FlixWhiz be your trusted companion for finding the next great film to enjoy.")


with tab2:
st.write("")
st.image('resources/imgs/Test.jpg',width=300)
st.write("")

col8, col9 = st.columns(2)
with col8:
st.markdown("\"As a movie enthusiast, FlixWhiz is my go-to platform for finding new films to watch. The recommendations are always on point, and I appreciate the variety of genres and options available. It's like having my own personal movie curator!\" - Sarah White")

with col9:
st.markdown("\"I've tried other movie recommendation platforms, but none come close to FlixWhiz. The accuracy of their recommendations is impressive, and the quality of the movies suggested is consistently high. I've discovered some of my all-time favorite films through this app.\" - Mpho Maremane")

st.write("")
col10, col11 = st.columns(2)
with col10:
st.markdown("\"FlixWhiz has revolutionized the way I discover movies. The personalized recommendations are spot-on, and I've discovered so many hidden gems that I wouldn't have found otherwise. Highly recommended!\" - John Schoeman")

with col11:
st.markdown("\"I love how easy and user-friendly FlixWhiz is. The interface is clean and intuitive, and the recommendations are tailored to my preferences. It's like having a virtual movie buddy who knows exactly what I'll enjoy!\" - Michael Reid")

with tab3:

col12, col13 = st.columns(2)
with col12:
# Contact Us Section
st.title("Contact Us")

# Input fields for name, email, and message
name = st.text_input("Your Name")
email = st.text_input("Your Email")
message = st.text_area("Message")

# Submit button
if st.button("Submit"):
# Process the form data
# You can add your own logic here, such as sending an email or storing the data in a database
st.success("Thank you for your message! We will get back to you soon.")

st.write("")


with col13:
st.title("Contact Details")
st.write("Office Line : (+27) 43 656 9800")
st.write("Emergency Line : (+27) 43 656 9000")
st.write("Email Address : [email protected]")
st.image("resources/imgs/Logo.jpg", width=300)

if page_selection == "FlixWhiz Info":
st.write("")






# You may want to add more sections here for aspects such as an EDA,
# or to provide your business pitch.


if __name__ == '__main__':
main()
main()
Binary file added resources/imgs/Flix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/Logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/Test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/back_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/back_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/cap1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/contact.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/feedback.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/movie_background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.