Spaces:
Sleeping
Sleeping
Merge pull request #8 from qxzjy/reco_02
Browse files- notebook/RECO_02.ipynb +0 -0
- pages/3_🥷_Users.py +3 -3
- utils/common.py +1 -1
notebook/RECO_02.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pages/3_🥷_Users.py
CHANGED
|
@@ -49,11 +49,11 @@ if selected_user_profile != None :
|
|
| 49 |
if selected_profile_recommendations.empty :
|
| 50 |
st.write("No recommendation provided, no favorites animes.")
|
| 51 |
else:
|
| 52 |
-
|
| 53 |
|
| 54 |
-
for i in range(0, len(
|
| 55 |
cols = st.columns(3)
|
| 56 |
-
for col, fav in zip(cols,
|
| 57 |
anime = load_anime(df_animes, fav)
|
| 58 |
if anime is not None:
|
| 59 |
with col:
|
|
|
|
| 49 |
if selected_profile_recommendations.empty :
|
| 50 |
st.write("No recommendation provided, no favorites animes.")
|
| 51 |
else:
|
| 52 |
+
recommendations = ast.literal_eval(selected_profile_recommendations["recommendations"])
|
| 53 |
|
| 54 |
+
for i in range(0, len(recommendations), 3):
|
| 55 |
cols = st.columns(3)
|
| 56 |
+
for col, fav in zip(cols, recommendations[i:i+3]):
|
| 57 |
anime = load_anime(df_animes, fav)
|
| 58 |
if anime is not None:
|
| 59 |
with col:
|
utils/common.py
CHANGED
|
@@ -6,7 +6,7 @@ DATA_ANIMES_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.c
|
|
| 6 |
DATA_PROFILES_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/profiles_clean.csv")
|
| 7 |
DATA_REVIEWS_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/reviews_clean.csv")
|
| 8 |
DATA_SYNOPSIS_EMBEDDING_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/synopsis_embedding.json")
|
| 9 |
-
DATA_ALS_RECOMMENDATION_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/
|
| 10 |
|
| 11 |
# ANIMES
|
| 12 |
@st.cache_data
|
|
|
|
| 6 |
DATA_PROFILES_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/profiles_clean.csv")
|
| 7 |
DATA_REVIEWS_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/reviews_clean.csv")
|
| 8 |
DATA_SYNOPSIS_EMBEDDING_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/synopsis_embedding.json")
|
| 9 |
+
DATA_ALS_RECOMMENDATION_URL = ("https://anime-recommendation-engine.s3.eu-west-3.amazonaws.com/data/als_is_favorite_based_reco.csv")
|
| 10 |
|
| 11 |
# ANIMES
|
| 12 |
@st.cache_data
|