From 8102a5799193bad8b576535da36bcb553458942f Mon Sep 17 00:00:00 2001 From: MIGHTY1o1 Date: Sat, 19 Oct 2024 02:11:43 +0530 Subject: [PATCH] add content to sidebar --- Web_app/Home_Page.py | 146 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 141 insertions(+), 5 deletions(-) diff --git a/Web_app/Home_Page.py b/Web_app/Home_Page.py index 1f86d05..d4cd487 100644 --- a/Web_app/Home_Page.py +++ b/Web_app/Home_Page.py @@ -1,14 +1,124 @@ import streamlit as st +# Configure the page st.set_page_config( - page_title="Home Page", + page_title="Movie Review Analysis and Recommendation System", page_icon="👋", ) +# Welcome message st.write("# Welcome to Movie Review Analysis and Recommendation System 👋") -st.sidebar.success("Select above part.") +# Sidebar with enhanced content +with st.sidebar: + # Animated header + st.markdown( + """ + +

🎬 Movie Insights

+ """, + unsafe_allow_html=True, + ) + + # Adding selectboxes for user customization + genre_filter = st.selectbox( + "🎭 **Select Movie Genre**", + options=["Action", "Comedy", "Drama", "Horror", "Romantic", "Sci-Fi"], + ) + + rating_filter = st.selectbox( + "⭐ **Filter Movies by Rating**", + options=["All", "1-3 stars", "4-6 stars", "7-8 stars", "9-10 stars"], + ) + + sentiment_analysis = st.checkbox("🔍 Enable Sentiment Analysis", value=True) + + # Fun fact section + st.markdown( + """ + +

Did you know? The highest-grossing movie of all time is **Avatar** (2009)!

+ """, + unsafe_allow_html=True, + ) + + # Random movie suggestion button + if st.button("🎉 Get a Random Movie Recommendation!"): + st.success( + "How about watching **Inception**? A mind-bending thriller that will keep you on the edge of your seat!" + ) + + # Movie trivia quiz section + st.markdown("### 🎲 Movie Trivia Challenge!") + trivia_questions = [ + "What is the name of the wizarding school in Harry Potter?", + "Which movie features a character named 'Forrest Gump'?", + "In which film does the phrase 'Here's looking at you, kid' appear?", + ] + selected_question = st.selectbox("Select a trivia question:", trivia_questions) + + if st.button("📝 Submit Answer"): + st.success( + f"You selected: '{selected_question}'. Now, what's your answer? Type below!" + ) + + # Crazy challenge + st.markdown( + """ + +
+ 🚀 **Crazy Challenge!** 🚀
+ Try to guess the movie from this emoji: 🍕👨‍🍳👊 + If you think you know the answer, type it in the box below! +
+ """, + unsafe_allow_html=True, + ) + + # Input box for the movie guessing game + guess_movie = st.text_input("🤔 Your Guess:") + if guess_movie: + st.write(f"You guessed: {guess_movie}. Let's see if you're right!") + + # Movie recommendation trends + st.markdown("### 📊 Movie Recommendation Trends") + st.write("**Popular Genres:**") + st.progress(0.7) # Simulating a genre popularity chart + st.write("**Top Rated Movies:**") + st.progress(0.85) # Simulating a top-rated movies chart + + # Conclusion + st.success("Select options to refine your movie recommendations and have fun!") + +# Main content with a structured introduction st.markdown( """ ### Introduction @@ -22,6 +132,32 @@ 2. **Personalized Recommendations** : Recommends movies based on content filtering. **👈 Select the part from the sidebar** - -""" -) \ No newline at end of file + """ +) + +# Adding some animation to the main content +st.markdown( + """ + +

🌟 Discover Your Next Favorite Movie! 🌟

+ """, + unsafe_allow_html=True, +)