config file for theme
Browse files- .DS_Store +0 -0
- .streamlit/config.toml +6 -0
- .streamlit/credentials.toml +2 -0
- app.py +20 -22
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
.streamlit/config.toml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[theme]
|
2 |
+
primaryColor="#FF4B4B"
|
3 |
+
backgroundColor="#0E1117"
|
4 |
+
secondaryBackgroundColor="#E50914"
|
5 |
+
textColor="#FAFAFA"
|
6 |
+
font="sans serif"
|
.streamlit/credentials.toml
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
[general]
|
2 |
+
email = ""
|
app.py
CHANGED
@@ -13,7 +13,6 @@ from sklearn.metrics.pairwise import cosine_similarity
|
|
13 |
import numpy as np
|
14 |
import pandas as pd
|
15 |
import streamlit as st
|
16 |
-
from random import choice
|
17 |
import subprocess
|
18 |
import sys
|
19 |
|
@@ -31,7 +30,6 @@ links_df = pd.read_csv(
|
|
31 |
'https://raw.githubusercontent.com/sherwan-m/WBSFLIX_Recommender_System/main/ml-latest-small/links.csv')
|
32 |
tags_df = pd.read_csv(
|
33 |
'https://raw.githubusercontent.com/sherwan-m/WBSFLIX_Recommender_System/main/ml-latest-small/tags.csv')
|
34 |
-
|
35 |
# %% format dataframes
|
36 |
# MOVIE DF:
|
37 |
movie_df = (
|
@@ -170,39 +168,39 @@ x = popular_n_movies(5, 'Any')
|
|
170 |
st.set_page_config(page_title="WBSFLIX",
|
171 |
page_icon="π¬",
|
172 |
initial_sidebar_state="expanded",
|
173 |
-
|
174 |
)
|
175 |
|
176 |
# set colors: These has to be set on the setting menu online
|
177 |
# primary color: #FF4B4B, background color:#0E1117
|
178 |
-
# text color: #FAFAFA,
|
179 |
|
180 |
# Set the logo of app
|
181 |
st.sidebar.image("wbs_logo.png",
|
182 |
width=300, clamp=True)
|
183 |
-
welcome_img = Image.open(
|
184 |
st.image(welcome_img)
|
185 |
-
st.markdown("""
|
186 |
# π¬ Welcome to the next generation movie recommendation app
|
187 |
""")
|
188 |
|
189 |
# %% APP WORKFLOW
|
190 |
-
st.markdown("""
|
191 |
### How may we help you?
|
192 |
"""
|
193 |
-
|
194 |
# Popularity based recommender system
|
195 |
-
genre_default
|
196 |
-
pop_based_rec = st.checkbox("Show me the all time favourites",
|
197 |
-
|
198 |
-
|
199 |
|
200 |
|
201 |
if pop_based_rec:
|
202 |
-
st.markdown("### Select Genre and
|
203 |
genre_default, n_default = None, 5
|
204 |
with st.form(key="pop_form"):
|
205 |
-
|
206 |
genre = st.multiselect(
|
207 |
"Genre",
|
208 |
options=genre_list,
|
@@ -229,11 +227,10 @@ st.write("")
|
|
229 |
st.write("")
|
230 |
st.write("")
|
231 |
|
232 |
-
item_based_rec = st.checkbox("Show me a movie like this",
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
'No Country for Old Men (2007)']
|
237 |
if item_based_rec:
|
238 |
st.markdown("### Tell us a movie you like:")
|
239 |
with st.form(key="movie_form"):
|
@@ -242,6 +239,7 @@ if item_based_rec:
|
|
242 |
options=pd.Series(movie_list),
|
243 |
help="Select a movie you like",
|
244 |
key='item_select',
|
|
|
245 |
)
|
246 |
|
247 |
nr_rec = st.slider("Number of recommendations",
|
@@ -266,9 +264,9 @@ st.write("")
|
|
266 |
st.write("")
|
267 |
st.write("")
|
268 |
|
269 |
-
user_based_rec = st.checkbox("I want to get personalized recommendations",
|
270 |
-
|
271 |
-
|
272 |
|
273 |
if user_based_rec:
|
274 |
st.markdown("### Please login to get customized recommendations just for you")
|
|
|
13 |
import numpy as np
|
14 |
import pandas as pd
|
15 |
import streamlit as st
|
|
|
16 |
import subprocess
|
17 |
import sys
|
18 |
|
|
|
30 |
'https://raw.githubusercontent.com/sherwan-m/WBSFLIX_Recommender_System/main/ml-latest-small/links.csv')
|
31 |
tags_df = pd.read_csv(
|
32 |
'https://raw.githubusercontent.com/sherwan-m/WBSFLIX_Recommender_System/main/ml-latest-small/tags.csv')
|
|
|
33 |
# %% format dataframes
|
34 |
# MOVIE DF:
|
35 |
movie_df = (
|
|
|
168 |
st.set_page_config(page_title="WBSFLIX",
|
169 |
page_icon="π¬",
|
170 |
initial_sidebar_state="expanded",
|
171 |
+
layout="wide"
|
172 |
)
|
173 |
|
174 |
# set colors: These has to be set on the setting menu online
|
175 |
# primary color: #FF4B4B, background color:#0E1117
|
176 |
+
# text color: #FAFAFA, secondary background color: #E50914
|
177 |
|
178 |
# Set the logo of app
|
179 |
st.sidebar.image("wbs_logo.png",
|
180 |
width=300, clamp=True)
|
181 |
+
welcome_img = Image.open('welcome_page_img01.png')
|
182 |
st.image(welcome_img)
|
183 |
+
st.sidebar.markdown("""
|
184 |
# π¬ Welcome to the next generation movie recommendation app
|
185 |
""")
|
186 |
|
187 |
# %% APP WORKFLOW
|
188 |
+
st.sidebar.markdown("""
|
189 |
### How may we help you?
|
190 |
"""
|
191 |
+
)
|
192 |
# Popularity based recommender system
|
193 |
+
genre_default = None
|
194 |
+
pop_based_rec = st.sidebar.checkbox("Show me the all time favourites",
|
195 |
+
False,
|
196 |
+
help="Movies that are liked by many people")
|
197 |
|
198 |
|
199 |
if pop_based_rec:
|
200 |
+
st.markdown("### Select the Genre and the Number of recommendations")
|
201 |
genre_default, n_default = None, 5
|
202 |
with st.form(key="pop_form"):
|
203 |
+
genre_default = ['Any']
|
204 |
genre = st.multiselect(
|
205 |
"Genre",
|
206 |
options=genre_list,
|
|
|
227 |
st.write("")
|
228 |
st.write("")
|
229 |
|
230 |
+
item_based_rec = st.sidebar.checkbox("Show me a movie like this",
|
231 |
+
False,
|
232 |
+
help="Input some movies and we will show you similar ones")
|
233 |
+
|
|
|
234 |
if item_based_rec:
|
235 |
st.markdown("### Tell us a movie you like:")
|
236 |
with st.form(key="movie_form"):
|
|
|
239 |
options=pd.Series(movie_list),
|
240 |
help="Select a movie you like",
|
241 |
key='item_select',
|
242 |
+
# default=choice(short_movie_list)
|
243 |
)
|
244 |
|
245 |
nr_rec = st.slider("Number of recommendations",
|
|
|
264 |
st.write("")
|
265 |
st.write("")
|
266 |
|
267 |
+
user_based_rec = st.sidebar.checkbox("I want to get personalized recommendations",
|
268 |
+
False,
|
269 |
+
help="Login to get personalized recommendations")
|
270 |
|
271 |
if user_based_rec:
|
272 |
st.markdown("### Please login to get customized recommendations just for you")
|