1
1
import streamlit as st
2
2
3
+ # Configure the page
3
4
st .set_page_config (
4
- page_title = "Home Page " ,
5
+ page_title = "Movie Review Analysis and Recommendation System " ,
5
6
page_icon = "👋" ,
6
7
)
7
8
9
+ # Welcome message
8
10
st .write ("# Welcome to Movie Review Analysis and Recommendation System 👋" )
9
11
10
- st .sidebar .success ("Select above part." )
12
+ # Sidebar with enhanced content
13
+ with st .sidebar :
14
+ # Animated header
15
+ st .markdown (
16
+ """
17
+ <style>
18
+ .animated-header {
19
+ animation: fadeIn 2s;
20
+ font-size: 24px;
21
+ color: #f39c12;
22
+ text-align: center;
23
+ }
11
24
25
+ @keyframes fadeIn {
26
+ from { opacity: 0; }
27
+ to { opacity: 1; }
28
+ }
29
+ </style>
30
+ <h2 class="animated-header">🎬 Movie Insights</h2>
31
+ """ ,
32
+ unsafe_allow_html = True ,
33
+ )
34
+
35
+ # Adding selectboxes for user customization
36
+ genre_filter = st .selectbox (
37
+ "🎭 **Select Movie Genre**" ,
38
+ options = ["Action" , "Comedy" , "Drama" , "Horror" , "Romantic" , "Sci-Fi" ],
39
+ )
40
+
41
+ rating_filter = st .selectbox (
42
+ "⭐ **Filter Movies by Rating**" ,
43
+ options = ["All" , "1-3 stars" , "4-6 stars" , "7-8 stars" , "9-10 stars" ],
44
+ )
45
+
46
+ sentiment_analysis = st .checkbox ("🔍 Enable Sentiment Analysis" , value = True )
47
+
48
+ # Fun fact section
49
+ st .markdown (
50
+ """
51
+ <style>
52
+ .fun-fact {
53
+ font-size: 14px;
54
+ color: #3498db;
55
+ font-style: italic;
56
+ text-align: center;
57
+ }
58
+ </style>
59
+ <p class="fun-fact">Did you know? The highest-grossing movie of all time is **Avatar** (2009)!</p>
60
+ """ ,
61
+ unsafe_allow_html = True ,
62
+ )
63
+
64
+ # Random movie suggestion button
65
+ if st .button ("🎉 Get a Random Movie Recommendation!" ):
66
+ st .success (
67
+ "How about watching **Inception**? A mind-bending thriller that will keep you on the edge of your seat!"
68
+ )
69
+
70
+ # Movie trivia quiz section
71
+ st .markdown ("### 🎲 Movie Trivia Challenge!" )
72
+ trivia_questions = [
73
+ "What is the name of the wizarding school in Harry Potter?" ,
74
+ "Which movie features a character named 'Forrest Gump'?" ,
75
+ "In which film does the phrase 'Here's looking at you, kid' appear?" ,
76
+ ]
77
+ selected_question = st .selectbox ("Select a trivia question:" , trivia_questions )
78
+
79
+ if st .button ("📝 Submit Answer" ):
80
+ st .success (
81
+ f"You selected: '{ selected_question } '. Now, what's your answer? Type below!"
82
+ )
83
+
84
+ # Crazy challenge
85
+ st .markdown (
86
+ """
87
+ <style>
88
+ .crazy-fun {
89
+ background-color: #f1c40f;
90
+ padding: 10px;
91
+ border-radius: 8px;
92
+ text-align: center;
93
+ font-size: 18px;
94
+ color: #2c3e50;
95
+ }
96
+ </style>
97
+ <div class="crazy-fun">
98
+ 🚀 **Crazy Challenge!** 🚀<br>
99
+ Try to guess the movie from this emoji: 🍕👨🍳👊
100
+ If you think you know the answer, type it in the box below!
101
+ </div>
102
+ """ ,
103
+ unsafe_allow_html = True ,
104
+ )
105
+
106
+ # Input box for the movie guessing game
107
+ guess_movie = st .text_input ("🤔 Your Guess:" )
108
+ if guess_movie :
109
+ st .write (f"You guessed: { guess_movie } . Let's see if you're right!" )
110
+
111
+ # Movie recommendation trends
112
+ st .markdown ("### 📊 Movie Recommendation Trends" )
113
+ st .write ("**Popular Genres:**" )
114
+ st .progress (0.7 ) # Simulating a genre popularity chart
115
+ st .write ("**Top Rated Movies:**" )
116
+ st .progress (0.85 ) # Simulating a top-rated movies chart
117
+
118
+ # Conclusion
119
+ st .success ("Select options to refine your movie recommendations and have fun!" )
120
+
121
+ # Main content with a structured introduction
12
122
st .markdown (
13
123
"""
14
124
### Introduction
22
132
2. **Personalized Recommendations** : Recommends movies based on content filtering.
23
133
24
134
**👈 Select the part from the sidebar**
25
-
26
- """
27
- )
135
+ """
136
+ )
137
+
138
+ # Adding some animation to the main content
139
+ st .markdown (
140
+ """
141
+ <style>
142
+ .animated-text {
143
+ animation: bounce 2s infinite;
144
+ text-align: center;
145
+ color: #e74c3c;
146
+ }
147
+
148
+ @keyframes bounce {
149
+ 0%, 20%, 50%, 80%, 100% {
150
+ transform: translateY(0);
151
+ }
152
+ 40% {
153
+ transform: translateY(-10px);
154
+ }
155
+ 60% {
156
+ transform: translateY(-5px);
157
+ }
158
+ }
159
+ </style>
160
+ <h3 class="animated-text">🌟 Discover Your Next Favorite Movie! 🌟</h3>
161
+ """ ,
162
+ unsafe_allow_html = True ,
163
+ )
0 commit comments