Spaces:
Sleeping
Sleeping
Commit
Browse files- Pages/Recommender App.py +32 -33
- requirements.txt +1 -1
Pages/Recommender App.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import streamlit as st
|
2 |
-
from streamlit import link_button as lb
|
3 |
import pandas as pd
|
4 |
import pickle
|
5 |
from ast import literal_eval
|
@@ -111,28 +110,28 @@ def top_animes():
|
|
111 |
with st.container():
|
112 |
col0, col1, col2, col3 = st.columns(4)
|
113 |
with col0:
|
114 |
-
|
115 |
f"{top8.iloc[0].title}",
|
116 |
f"{top8.iloc[0].anime_url}",
|
117 |
use_container_width=True,
|
118 |
)
|
119 |
st.image(top8.iloc[0].poster)
|
120 |
with col1:
|
121 |
-
|
122 |
f"{top8.iloc[1].title}",
|
123 |
f"{top8.iloc[1].anime_url}",
|
124 |
use_container_width=True,
|
125 |
)
|
126 |
st.image(top8.iloc[1].poster)
|
127 |
with col2:
|
128 |
-
|
129 |
f"{top8.iloc[2].title}",
|
130 |
f"{top8.iloc[2].anime_url}",
|
131 |
use_container_width=True,
|
132 |
)
|
133 |
st.image(top8.iloc[2].poster)
|
134 |
with col3:
|
135 |
-
|
136 |
f"{top8.iloc[3].title}",
|
137 |
f"{top8.iloc[3].anime_url}",
|
138 |
use_container_width=True,
|
@@ -144,28 +143,28 @@ def top_animes():
|
|
144 |
with st.container():
|
145 |
col4, col5, col6, col7 = st.columns(4)
|
146 |
with col4:
|
147 |
-
|
148 |
f"{top8.iloc[4].title}",
|
149 |
f"{top8.iloc[4].anime_url}",
|
150 |
use_container_width=True,
|
151 |
)
|
152 |
st.image(top8.iloc[4].poster)
|
153 |
with col5:
|
154 |
-
|
155 |
f"{top8.iloc[5].title}",
|
156 |
f"{top8.iloc[5].anime_url}",
|
157 |
use_container_width=True,
|
158 |
)
|
159 |
st.image(top8.iloc[5].poster)
|
160 |
with col6:
|
161 |
-
|
162 |
f"{top8.iloc[6].title}",
|
163 |
f"{top8.iloc[6].anime_url}",
|
164 |
use_container_width=True,
|
165 |
)
|
166 |
st.image(top8.iloc[6].poster)
|
167 |
with col7:
|
168 |
-
|
169 |
f"{top8.iloc[7].title}",
|
170 |
f"{top8.iloc[7].anime_url}",
|
171 |
use_container_width=True,
|
@@ -197,28 +196,28 @@ def top_animes_genres(genre_select):
|
|
197 |
].sort_values("score", ascending=False)[:8]
|
198 |
col0, col1, col2, col3 = st.columns(4)
|
199 |
with col0:
|
200 |
-
|
201 |
f"{top_8_genre.iloc[0].title}",
|
202 |
f"{top_8_genre.iloc[0].anime_url}",
|
203 |
use_container_width=True,
|
204 |
)
|
205 |
st.image(top_8_genre.iloc[0].poster)
|
206 |
with col1:
|
207 |
-
|
208 |
f"{top_8_genre.iloc[1].title}",
|
209 |
f"{top_8_genre.iloc[1].anime_url}",
|
210 |
use_container_width=True,
|
211 |
)
|
212 |
st.image(top_8_genre.iloc[1].poster)
|
213 |
with col2:
|
214 |
-
|
215 |
f"{top_8_genre.iloc[2].title}",
|
216 |
f"{top_8_genre.iloc[2].anime_url}",
|
217 |
use_container_width=True,
|
218 |
)
|
219 |
st.image(top_8_genre.iloc[2].poster)
|
220 |
with col3:
|
221 |
-
|
222 |
f"{top_8_genre.iloc[3].title}",
|
223 |
f"{top_8_genre.iloc[3].anime_url}",
|
224 |
use_container_width=True,
|
@@ -229,28 +228,28 @@ def top_animes_genres(genre_select):
|
|
229 |
|
230 |
col4, col5, col6, col7 = st.columns(4)
|
231 |
with col4:
|
232 |
-
|
233 |
f"{top_8_genre.iloc[4].title}",
|
234 |
f"{top_8_genre.iloc[4].anime_url}",
|
235 |
use_container_width=True,
|
236 |
)
|
237 |
st.image(top_8_genre.iloc[4].poster)
|
238 |
with col5:
|
239 |
-
|
240 |
f"{top_8_genre.iloc[5].title}",
|
241 |
f"{top_8_genre.iloc[5].anime_url}",
|
242 |
use_container_width=True,
|
243 |
)
|
244 |
st.image(top_8_genre.iloc[5].poster)
|
245 |
with col6:
|
246 |
-
|
247 |
f"{top_8_genre.iloc[6].title}",
|
248 |
f"{top_8_genre.iloc[6].anime_url}",
|
249 |
use_container_width=True,
|
250 |
)
|
251 |
st.image(top_8_genre.iloc[6].poster)
|
252 |
with col7:
|
253 |
-
|
254 |
f"{top_8_genre.iloc[7].title}",
|
255 |
f"{top_8_genre.iloc[7].anime_url}",
|
256 |
use_container_width=True,
|
@@ -285,28 +284,28 @@ def top_animes_custom(anime_select):
|
|
285 |
with st.container():
|
286 |
col0, col1, col2, col3 = st.columns(4)
|
287 |
with col0:
|
288 |
-
|
289 |
f"{recommended_anime_names[0]}",
|
290 |
f"{recommended_anime_urls[0]}",
|
291 |
use_container_width=True,
|
292 |
)
|
293 |
st.image(recommended_anime_posters[0])
|
294 |
with col1:
|
295 |
-
|
296 |
f"{recommended_anime_names[1]}",
|
297 |
f"{recommended_anime_urls[1]}",
|
298 |
use_container_width=True,
|
299 |
)
|
300 |
st.image(recommended_anime_posters[1])
|
301 |
with col2:
|
302 |
-
|
303 |
f"{recommended_anime_names[2]}",
|
304 |
f"{recommended_anime_urls[2]}",
|
305 |
use_container_width=True,
|
306 |
)
|
307 |
st.image(recommended_anime_posters[2])
|
308 |
with col3:
|
309 |
-
|
310 |
f"{recommended_anime_names[3]}",
|
311 |
f"{recommended_anime_urls[3]}",
|
312 |
use_container_width=True,
|
@@ -318,28 +317,28 @@ def top_animes_custom(anime_select):
|
|
318 |
with st.container():
|
319 |
col4, col5, col6, col7 = st.columns(4)
|
320 |
with col4:
|
321 |
-
|
322 |
f"{recommended_anime_names[4]}",
|
323 |
f"{recommended_anime_urls[4]}",
|
324 |
use_container_width=True,
|
325 |
)
|
326 |
st.image(recommended_anime_posters[4])
|
327 |
with col5:
|
328 |
-
|
329 |
f"{recommended_anime_names[5]}",
|
330 |
f"{recommended_anime_urls[5]}",
|
331 |
use_container_width=True,
|
332 |
)
|
333 |
st.image(recommended_anime_posters[5])
|
334 |
with col6:
|
335 |
-
|
336 |
f"{recommended_anime_names[6]}",
|
337 |
f"{recommended_anime_urls[6]}",
|
338 |
use_container_width=True,
|
339 |
)
|
340 |
st.image(recommended_anime_posters[6])
|
341 |
with col7:
|
342 |
-
|
343 |
f"{recommended_anime_names[7]}",
|
344 |
f"{recommended_anime_urls[7]}",
|
345 |
use_container_width=True,
|
@@ -374,28 +373,28 @@ def top_animes_custom_genres(anime_select, genre_select):
|
|
374 |
with st.container():
|
375 |
col0, col1, col2, col3 = st.columns(4)
|
376 |
with col0:
|
377 |
-
|
378 |
f"{recommended_anime_names[0]}",
|
379 |
f"{recommended_anime_urls[0]}",
|
380 |
use_container_width=True,
|
381 |
)
|
382 |
st.image(recommended_anime_posters[0])
|
383 |
with col1:
|
384 |
-
|
385 |
f"{recommended_anime_names[1]}",
|
386 |
f"{recommended_anime_urls[1]}",
|
387 |
use_container_width=True,
|
388 |
)
|
389 |
st.image(recommended_anime_posters[1])
|
390 |
with col2:
|
391 |
-
|
392 |
f"{recommended_anime_names[2]}",
|
393 |
f"{recommended_anime_urls[2]}",
|
394 |
use_container_width=True,
|
395 |
)
|
396 |
st.image(recommended_anime_posters[2])
|
397 |
with col3:
|
398 |
-
|
399 |
f"{recommended_anime_names[3]}",
|
400 |
f"{recommended_anime_urls[3]}",
|
401 |
use_container_width=True,
|
@@ -407,28 +406,28 @@ def top_animes_custom_genres(anime_select, genre_select):
|
|
407 |
with st.container():
|
408 |
col4, col5, col6, col7 = st.columns(4)
|
409 |
with col4:
|
410 |
-
|
411 |
f"{recommended_anime_names[4]}",
|
412 |
f"{recommended_anime_urls[4]}",
|
413 |
use_container_width=True,
|
414 |
)
|
415 |
st.image(recommended_anime_posters[4])
|
416 |
with col5:
|
417 |
-
|
418 |
f"{recommended_anime_names[5]}",
|
419 |
f"{recommended_anime_urls[5]}",
|
420 |
use_container_width=True,
|
421 |
)
|
422 |
st.image(recommended_anime_posters[5])
|
423 |
with col6:
|
424 |
-
|
425 |
f"{recommended_anime_names[6]}",
|
426 |
f"{recommended_anime_urls[6]}",
|
427 |
use_container_width=True,
|
428 |
)
|
429 |
st.image(recommended_anime_posters[6])
|
430 |
with col7:
|
431 |
-
|
432 |
f"{recommended_anime_names[7]}",
|
433 |
f"{recommended_anime_urls[7]}",
|
434 |
use_container_width=True,
|
|
|
1 |
import streamlit as st
|
|
|
2 |
import pandas as pd
|
3 |
import pickle
|
4 |
from ast import literal_eval
|
|
|
110 |
with st.container():
|
111 |
col0, col1, col2, col3 = st.columns(4)
|
112 |
with col0:
|
113 |
+
st.link_button(
|
114 |
f"{top8.iloc[0].title}",
|
115 |
f"{top8.iloc[0].anime_url}",
|
116 |
use_container_width=True,
|
117 |
)
|
118 |
st.image(top8.iloc[0].poster)
|
119 |
with col1:
|
120 |
+
st.link_button(
|
121 |
f"{top8.iloc[1].title}",
|
122 |
f"{top8.iloc[1].anime_url}",
|
123 |
use_container_width=True,
|
124 |
)
|
125 |
st.image(top8.iloc[1].poster)
|
126 |
with col2:
|
127 |
+
st.link_button(
|
128 |
f"{top8.iloc[2].title}",
|
129 |
f"{top8.iloc[2].anime_url}",
|
130 |
use_container_width=True,
|
131 |
)
|
132 |
st.image(top8.iloc[2].poster)
|
133 |
with col3:
|
134 |
+
st.link_button(
|
135 |
f"{top8.iloc[3].title}",
|
136 |
f"{top8.iloc[3].anime_url}",
|
137 |
use_container_width=True,
|
|
|
143 |
with st.container():
|
144 |
col4, col5, col6, col7 = st.columns(4)
|
145 |
with col4:
|
146 |
+
st.link_button(
|
147 |
f"{top8.iloc[4].title}",
|
148 |
f"{top8.iloc[4].anime_url}",
|
149 |
use_container_width=True,
|
150 |
)
|
151 |
st.image(top8.iloc[4].poster)
|
152 |
with col5:
|
153 |
+
st.link_button(
|
154 |
f"{top8.iloc[5].title}",
|
155 |
f"{top8.iloc[5].anime_url}",
|
156 |
use_container_width=True,
|
157 |
)
|
158 |
st.image(top8.iloc[5].poster)
|
159 |
with col6:
|
160 |
+
st.link_button(
|
161 |
f"{top8.iloc[6].title}",
|
162 |
f"{top8.iloc[6].anime_url}",
|
163 |
use_container_width=True,
|
164 |
)
|
165 |
st.image(top8.iloc[6].poster)
|
166 |
with col7:
|
167 |
+
st.link_button(
|
168 |
f"{top8.iloc[7].title}",
|
169 |
f"{top8.iloc[7].anime_url}",
|
170 |
use_container_width=True,
|
|
|
196 |
].sort_values("score", ascending=False)[:8]
|
197 |
col0, col1, col2, col3 = st.columns(4)
|
198 |
with col0:
|
199 |
+
st.link_button(
|
200 |
f"{top_8_genre.iloc[0].title}",
|
201 |
f"{top_8_genre.iloc[0].anime_url}",
|
202 |
use_container_width=True,
|
203 |
)
|
204 |
st.image(top_8_genre.iloc[0].poster)
|
205 |
with col1:
|
206 |
+
st.link_button(
|
207 |
f"{top_8_genre.iloc[1].title}",
|
208 |
f"{top_8_genre.iloc[1].anime_url}",
|
209 |
use_container_width=True,
|
210 |
)
|
211 |
st.image(top_8_genre.iloc[1].poster)
|
212 |
with col2:
|
213 |
+
st.link_button(
|
214 |
f"{top_8_genre.iloc[2].title}",
|
215 |
f"{top_8_genre.iloc[2].anime_url}",
|
216 |
use_container_width=True,
|
217 |
)
|
218 |
st.image(top_8_genre.iloc[2].poster)
|
219 |
with col3:
|
220 |
+
st.link_button(
|
221 |
f"{top_8_genre.iloc[3].title}",
|
222 |
f"{top_8_genre.iloc[3].anime_url}",
|
223 |
use_container_width=True,
|
|
|
228 |
|
229 |
col4, col5, col6, col7 = st.columns(4)
|
230 |
with col4:
|
231 |
+
st.link_button(
|
232 |
f"{top_8_genre.iloc[4].title}",
|
233 |
f"{top_8_genre.iloc[4].anime_url}",
|
234 |
use_container_width=True,
|
235 |
)
|
236 |
st.image(top_8_genre.iloc[4].poster)
|
237 |
with col5:
|
238 |
+
st.link_button(
|
239 |
f"{top_8_genre.iloc[5].title}",
|
240 |
f"{top_8_genre.iloc[5].anime_url}",
|
241 |
use_container_width=True,
|
242 |
)
|
243 |
st.image(top_8_genre.iloc[5].poster)
|
244 |
with col6:
|
245 |
+
st.link_button(
|
246 |
f"{top_8_genre.iloc[6].title}",
|
247 |
f"{top_8_genre.iloc[6].anime_url}",
|
248 |
use_container_width=True,
|
249 |
)
|
250 |
st.image(top_8_genre.iloc[6].poster)
|
251 |
with col7:
|
252 |
+
st.link_button(
|
253 |
f"{top_8_genre.iloc[7].title}",
|
254 |
f"{top_8_genre.iloc[7].anime_url}",
|
255 |
use_container_width=True,
|
|
|
284 |
with st.container():
|
285 |
col0, col1, col2, col3 = st.columns(4)
|
286 |
with col0:
|
287 |
+
st.link_button(
|
288 |
f"{recommended_anime_names[0]}",
|
289 |
f"{recommended_anime_urls[0]}",
|
290 |
use_container_width=True,
|
291 |
)
|
292 |
st.image(recommended_anime_posters[0])
|
293 |
with col1:
|
294 |
+
st.link_button(
|
295 |
f"{recommended_anime_names[1]}",
|
296 |
f"{recommended_anime_urls[1]}",
|
297 |
use_container_width=True,
|
298 |
)
|
299 |
st.image(recommended_anime_posters[1])
|
300 |
with col2:
|
301 |
+
st.link_button(
|
302 |
f"{recommended_anime_names[2]}",
|
303 |
f"{recommended_anime_urls[2]}",
|
304 |
use_container_width=True,
|
305 |
)
|
306 |
st.image(recommended_anime_posters[2])
|
307 |
with col3:
|
308 |
+
st.link_button(
|
309 |
f"{recommended_anime_names[3]}",
|
310 |
f"{recommended_anime_urls[3]}",
|
311 |
use_container_width=True,
|
|
|
317 |
with st.container():
|
318 |
col4, col5, col6, col7 = st.columns(4)
|
319 |
with col4:
|
320 |
+
st.link_button(
|
321 |
f"{recommended_anime_names[4]}",
|
322 |
f"{recommended_anime_urls[4]}",
|
323 |
use_container_width=True,
|
324 |
)
|
325 |
st.image(recommended_anime_posters[4])
|
326 |
with col5:
|
327 |
+
st.link_button(
|
328 |
f"{recommended_anime_names[5]}",
|
329 |
f"{recommended_anime_urls[5]}",
|
330 |
use_container_width=True,
|
331 |
)
|
332 |
st.image(recommended_anime_posters[5])
|
333 |
with col6:
|
334 |
+
st.link_button(
|
335 |
f"{recommended_anime_names[6]}",
|
336 |
f"{recommended_anime_urls[6]}",
|
337 |
use_container_width=True,
|
338 |
)
|
339 |
st.image(recommended_anime_posters[6])
|
340 |
with col7:
|
341 |
+
st.link_button(
|
342 |
f"{recommended_anime_names[7]}",
|
343 |
f"{recommended_anime_urls[7]}",
|
344 |
use_container_width=True,
|
|
|
373 |
with st.container():
|
374 |
col0, col1, col2, col3 = st.columns(4)
|
375 |
with col0:
|
376 |
+
st.link_button(
|
377 |
f"{recommended_anime_names[0]}",
|
378 |
f"{recommended_anime_urls[0]}",
|
379 |
use_container_width=True,
|
380 |
)
|
381 |
st.image(recommended_anime_posters[0])
|
382 |
with col1:
|
383 |
+
st.link_button(
|
384 |
f"{recommended_anime_names[1]}",
|
385 |
f"{recommended_anime_urls[1]}",
|
386 |
use_container_width=True,
|
387 |
)
|
388 |
st.image(recommended_anime_posters[1])
|
389 |
with col2:
|
390 |
+
st.link_button(
|
391 |
f"{recommended_anime_names[2]}",
|
392 |
f"{recommended_anime_urls[2]}",
|
393 |
use_container_width=True,
|
394 |
)
|
395 |
st.image(recommended_anime_posters[2])
|
396 |
with col3:
|
397 |
+
st.link_button(
|
398 |
f"{recommended_anime_names[3]}",
|
399 |
f"{recommended_anime_urls[3]}",
|
400 |
use_container_width=True,
|
|
|
406 |
with st.container():
|
407 |
col4, col5, col6, col7 = st.columns(4)
|
408 |
with col4:
|
409 |
+
st.link_button(
|
410 |
f"{recommended_anime_names[4]}",
|
411 |
f"{recommended_anime_urls[4]}",
|
412 |
use_container_width=True,
|
413 |
)
|
414 |
st.image(recommended_anime_posters[4])
|
415 |
with col5:
|
416 |
+
st.link_button(
|
417 |
f"{recommended_anime_names[5]}",
|
418 |
f"{recommended_anime_urls[5]}",
|
419 |
use_container_width=True,
|
420 |
)
|
421 |
st.image(recommended_anime_posters[5])
|
422 |
with col6:
|
423 |
+
st.link_button(
|
424 |
f"{recommended_anime_names[6]}",
|
425 |
f"{recommended_anime_urls[6]}",
|
426 |
use_container_width=True,
|
427 |
)
|
428 |
st.image(recommended_anime_posters[6])
|
429 |
with col7:
|
430 |
+
st.link_button(
|
431 |
f"{recommended_anime_names[7]}",
|
432 |
f"{recommended_anime_urls[7]}",
|
433 |
use_container_width=True,
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
st_pages==0.4.5
|
2 |
-
streamlit==1.27.
|
3 |
pandas==2.1.0
|
4 |
Pillow==9.5.0
|
|
|
1 |
st_pages==0.4.5
|
2 |
+
streamlit==1.27.2
|
3 |
pandas==2.1.0
|
4 |
Pillow==9.5.0
|