Harsh502s commited on
Commit
58f1838
1 Parent(s): 1775601

Refactor CSS class for home page image border

Browse files
Files changed (2) hide show
  1. Pages/Recommender App.py +247 -101
  2. app.py +1 -1
Pages/Recommender App.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  import pandas as pd
3
  import pickle
4
  from ast import literal_eval
 
5
 
6
 
7
  # Importing the dataset
@@ -90,27 +91,25 @@ def recommend(anime, genre=None):
90
  def top_animes():
91
  style_for_page = """
92
  <style>
93
- div.st-emotion-cache-1v0mbdj.e115fcil1>img {
 
 
 
 
 
 
 
 
94
  border-radius: 25px;
95
  }
96
- div.st-emotion-cache-1012qpg.e1nzilvr5 {
 
97
  text-align: center;
98
  }
99
- div.st-emotion-cache-1012qpg.e1nzilvr5>p {
100
- font-weight: 600;
101
- text-decoration: none;
102
- border: 3px solid #607985;
103
- border-radius: 10px;
104
- text-color: #607985;
105
- }
106
- div.st-emotion-cache-1012qpg.e1nzilvr5>p:hover {
107
- scale: 1.10;
108
  transition-duration: 0.3s;
109
  }
110
- div.st-emotion-cache-1012qpg.e1nzilvr5>p>a {
111
- text-decoration: none;
112
- color: #607985;
113
- }
114
  </style>
115
  """
116
  st.markdown(style_for_page, unsafe_allow_html=True)
@@ -120,16 +119,36 @@ def top_animes():
120
  with st.container():
121
  col0, col1, col2, col3 = st.columns(4)
122
  with col0:
123
- st.write(f"[{top8.iloc[0].title}]({top8.iloc[0].anime_url})")
 
 
 
 
 
124
  st.image(top8.iloc[0].poster, use_column_width=True)
125
  with col1:
126
- st.write(f"[{top8.iloc[1].title}]({top8.iloc[1].anime_url})")
 
 
 
 
 
127
  st.image(top8.iloc[1].poster, use_column_width=True)
128
  with col2:
129
- st.write(f"[{top8.iloc[2].title}]({top8.iloc[2].anime_url})")
 
 
 
 
 
130
  st.image(top8.iloc[2].poster, use_column_width=True)
131
  with col3:
132
- st.write(f"[{top8.iloc[3].title}]({top8.iloc[3].anime_url})")
 
 
 
 
 
133
  st.image(top8.iloc[3].poster, use_column_width=True)
134
 
135
  st.divider()
@@ -137,16 +156,36 @@ def top_animes():
137
  with st.container():
138
  col4, col5, col6, col7 = st.columns(4)
139
  with col4:
140
- st.write(f"[{top8.iloc[4].title}]({top8.iloc[4].anime_url})")
 
 
 
 
 
141
  st.image(top8.iloc[4].poster, use_column_width=True)
142
  with col5:
143
- st.write(f"[{top8.iloc[5].title}]({top8.iloc[5].anime_url})")
 
 
 
 
 
144
  st.image(top8.iloc[5].poster, use_column_width=True)
145
  with col6:
146
- st.write(f"[{top8.iloc[6].title}]({top8.iloc[6].anime_url})")
 
 
 
 
 
147
  st.image(top8.iloc[6].poster, use_column_width=True)
148
  with col7:
149
- st.write(f"[{top8.iloc[7].title}]({top8.iloc[7].anime_url})")
 
 
 
 
 
150
  st.image(top8.iloc[7].poster, use_column_width=True)
151
 
152
 
@@ -154,27 +193,25 @@ def top_animes():
154
  def top_animes_genres(genre_select):
155
  style_for_page = """
156
  <style>
157
- div.st-emotion-cache-1v0mbdj.e115fcil1>img {
 
 
 
 
 
 
 
 
158
  border-radius: 25px;
159
  }
160
- div.st-emotion-cache-1012qpg.e1nzilvr5 {
 
161
  text-align: center;
162
  }
163
- div.st-emotion-cache-1012qpg.e1nzilvr5>p {
164
- font-weight: 600;
165
- text-decoration: none;
166
- border: 3px solid #607985;
167
- border-radius: 10px;
168
- text-color: #607985;
169
- }
170
- div.st-emotion-cache-1012qpg.e1nzilvr5>p:hover {
171
- scale: 1.10;
172
  transition-duration: 0.3s;
173
  }
174
- div.st-emotion-cache-1012qpg.e1nzilvr5>p>a {
175
- text-decoration: none;
176
- color: #607985;
177
- }
178
  </style>
179
  """
180
  st.markdown(style_for_page, unsafe_allow_html=True)
@@ -184,32 +221,72 @@ def top_animes_genres(genre_select):
184
  ].sort_values("score", ascending=False)[:8]
185
  col0, col1, col2, col3 = st.columns(4)
186
  with col0:
187
- st.write(f"[{top_8_genre.iloc[0].title}]({top_8_genre.iloc[0].anime_url})")
 
 
 
 
 
188
  st.image(top_8_genre.iloc[0].poster, use_column_width=True)
189
  with col1:
190
- st.write(f"[{top_8_genre.iloc[1].title}]({top_8_genre.iloc[1].anime_url})")
 
 
 
 
 
191
  st.image(top_8_genre.iloc[1].poster, use_column_width=True)
192
  with col2:
193
- st.write(f"[{top_8_genre.iloc[2].title}]({top_8_genre.iloc[2].anime_url})")
 
 
 
 
 
194
  st.image(top_8_genre.iloc[2].poster, use_column_width=True)
195
  with col3:
196
- st.write(f"[{top_8_genre.iloc[3].title}]({top_8_genre.iloc[3].anime_url})")
 
 
 
 
 
197
  st.image(top_8_genre.iloc[3].poster, use_column_width=True)
198
 
199
  st.divider()
200
 
201
  col4, col5, col6, col7 = st.columns(4)
202
  with col4:
203
- st.write(f"[{top_8_genre.iloc[4].title}]({top_8_genre.iloc[4].anime_url})")
 
 
 
 
 
204
  st.image(top_8_genre.iloc[4].poster, use_column_width=True)
205
  with col5:
206
- st.write(f"[{top_8_genre.iloc[5].title}]({top_8_genre.iloc[5].anime_url})")
 
 
 
 
 
207
  st.image(top_8_genre.iloc[5].poster, use_column_width=True)
208
  with col6:
209
- st.write(f"[{top_8_genre.iloc[6].title}]({top_8_genre.iloc[6].anime_url})")
 
 
 
 
 
210
  st.image(top_8_genre.iloc[6].poster, use_column_width=True)
211
  with col7:
212
- st.write(f"[{top_8_genre.iloc[7].title}]({top_8_genre.iloc[7].anime_url})")
 
 
 
 
 
213
  st.image(top_8_genre.iloc[7].poster, use_column_width=True)
214
 
215
 
@@ -217,27 +294,25 @@ def top_animes_genres(genre_select):
217
  def top_animes_custom(anime_select):
218
  style_for_page = """
219
  <style>
220
- div.st-emotion-cache-1v0mbdj.e115fcil1>img {
 
 
 
 
 
 
 
 
221
  border-radius: 25px;
222
  }
223
- div.st-emotion-cache-1012qpg.e1nzilvr5 {
 
224
  text-align: center;
225
  }
226
- div.st-emotion-cache-1012qpg.e1nzilvr5>p {
227
- font-weight: 600;
228
- text-decoration: none;
229
- border: 3px solid #607985;
230
- border-radius: 10px;
231
- text-color: #607985;
232
- }
233
- div.st-emotion-cache-1012qpg.e1nzilvr5>p:hover {
234
- scale: 1.10;
235
  transition-duration: 0.3s;
236
  }
237
- div.st-emotion-cache-1012qpg.e1nzilvr5>p>a {
238
- text-decoration: none;
239
- color: #607985;
240
- }
241
  </style>
242
  """
243
  st.markdown(style_for_page, unsafe_allow_html=True)
@@ -250,16 +325,36 @@ def top_animes_custom(anime_select):
250
  with st.container():
251
  col0, col1, col2, col3 = st.columns(4)
252
  with col0:
253
- st.write(f"[{recommended_anime_names[0]}]({recommended_anime_urls[0]})")
 
 
 
 
 
254
  st.image(recommended_anime_posters[0], use_column_width=True)
255
  with col1:
256
- st.write(f"[{recommended_anime_names[1]}]({recommended_anime_urls[1]})")
 
 
 
 
 
257
  st.image(recommended_anime_posters[1], use_column_width=True)
258
  with col2:
259
- st.write(f"[{recommended_anime_names[2]}]({recommended_anime_urls[2]})")
 
 
 
 
 
260
  st.image(recommended_anime_posters[2], use_column_width=True)
261
  with col3:
262
- st.write(f"[{recommended_anime_names[3]}]({recommended_anime_urls[3]})")
 
 
 
 
 
263
  st.image(recommended_anime_posters[3], use_column_width=True)
264
 
265
  st.divider()
@@ -267,16 +362,36 @@ def top_animes_custom(anime_select):
267
  with st.container():
268
  col4, col5, col6, col7 = st.columns(4)
269
  with col4:
270
- st.write(f"[{recommended_anime_names[4]}]({recommended_anime_urls[4]})")
 
 
 
 
 
271
  st.image(recommended_anime_posters[4], use_column_width=True)
272
  with col5:
273
- st.write(f"[{recommended_anime_names[5]}]({recommended_anime_urls[5]})")
 
 
 
 
 
274
  st.image(recommended_anime_posters[5], use_column_width=True)
275
  with col6:
276
- st.write(f"[{recommended_anime_names[6]}]({recommended_anime_urls[6]})")
 
 
 
 
 
277
  st.image(recommended_anime_posters[6], use_column_width=True)
278
  with col7:
279
- st.write(f"[{recommended_anime_names[7]}]({recommended_anime_urls[7]})")
 
 
 
 
 
280
  st.image(recommended_anime_posters[7], use_column_width=True)
281
 
282
 
@@ -284,38 +399,25 @@ def top_animes_custom(anime_select):
284
  def top_animes_custom_genres(anime_select, genre_select):
285
  style_for_page = """
286
  <style>
287
- div.st-emotion-cache-1v0mbdj.e115fcil1>img {
288
- border-radius: 25px;
289
- }
290
- a.st-emotion-cache-1lbx6hs.e16zdaao0 {
291
  border-radius: 15px;
292
- text-align: center;
293
- }
294
- a.st-emotion-cache-1lbx6hs.e16zdaao0>div>p {
295
- font-weight: 600;
296
  }
297
- a.st-emotion-cache-1lbx6hs.e16zdaao0:hover {
298
  scale: 1.05;
299
  transition-duration: 0.3s;
300
  }
301
- div.st-emotion-cache-1012qpg.e1nzilvr5 {
302
- text-align: center;
303
  }
304
- div.st-emotion-cache-1012qpg.e1nzilvr5>p {
305
- font-weight: 600;
306
- text-decoration: none;
307
- border: 3px solid #607985;
308
- border-radius: 10px;
309
- text-color: #607985;
310
  }
311
- div.st-emotion-cache-1012qpg.e1nzilvr5>p:hover {
312
- scale: 1.10;
313
  transition-duration: 0.3s;
314
  }
315
- div.st-emotion-cache-1012qpg.e1nzilvr5>p>a {
316
- text-decoration: none;
317
- color: #607985;
318
- }
319
  </style>
320
  """
321
  st.markdown(style_for_page, unsafe_allow_html=True)
@@ -328,16 +430,36 @@ def top_animes_custom_genres(anime_select, genre_select):
328
  with st.container():
329
  col0, col1, col2, col3 = st.columns(4)
330
  with col0:
331
- st.write(f"[{recommended_anime_names[0]}]({recommended_anime_urls[0]})")
 
 
 
 
 
332
  st.image(recommended_anime_posters[0], use_column_width=True)
333
  with col1:
334
- st.write(f"[{recommended_anime_names[1]}]({recommended_anime_urls[1]})")
 
 
 
 
 
335
  st.image(recommended_anime_posters[1], use_column_width=True)
336
  with col2:
337
- st.write(f"[{recommended_anime_names[2]}]({recommended_anime_urls[2]})")
 
 
 
 
 
338
  st.image(recommended_anime_posters[2], use_column_width=True)
339
  with col3:
340
- st.write(f"[{recommended_anime_names[3]}]({recommended_anime_urls[3]})")
 
 
 
 
 
341
  st.image(recommended_anime_posters[3], use_column_width=True)
342
 
343
  st.divider()
@@ -345,16 +467,36 @@ def top_animes_custom_genres(anime_select, genre_select):
345
  with st.container():
346
  col4, col5, col6, col7 = st.columns(4)
347
  with col4:
348
- st.write(f"[{recommended_anime_names[4]}]({recommended_anime_urls[4]})")
 
 
 
 
 
349
  st.image(recommended_anime_posters[4], use_column_width=True)
350
  with col5:
351
- st.write(f"[{recommended_anime_names[5]}]({recommended_anime_urls[5]})")
 
 
 
 
 
352
  st.image(recommended_anime_posters[5], use_column_width=True)
353
  with col6:
354
- st.write(f"[{recommended_anime_names[6]}]({recommended_anime_urls[6]})")
 
 
 
 
 
355
  st.image(recommended_anime_posters[6], use_column_width=True)
356
  with col7:
357
- st.write(f"[{recommended_anime_names[7]}]({recommended_anime_urls[7]})")
 
 
 
 
 
358
  st.image(recommended_anime_posters[7], use_column_width=True)
359
 
360
 
@@ -362,7 +504,11 @@ def top_animes_custom_genres(anime_select, genre_select):
362
  def recommender_page():
363
  style_for_page = """
364
  <style>
365
- button.st-emotion-cache-c766yy.ef3psqc11 {
 
 
 
 
366
  border-radius: 10px;
367
  }
368
 
 
2
  import pandas as pd
3
  import pickle
4
  from ast import literal_eval
5
+ import webbrowser
6
 
7
 
8
  # Importing the dataset
 
91
  def top_animes():
92
  style_for_page = """
93
  <style>
94
+ .css-c766yy.ef3psqc11 {
95
+ border-radius: 15px;
96
+ text-align: center:
97
+ }
98
+ .css-c766yy.ef3psqc11:hover {
99
+ scale: 1.05;
100
+ transition-duration: 0.3s;
101
+ }
102
+ .css-1v0mbdj.e115fcil1>img {
103
  border-radius: 25px;
104
  }
105
+ button.css-1rgehwv.ef3psqc11 {
106
+ border-radius: 15px;
107
  text-align: center;
108
  }
109
+ button.css-1rgehwv.ef3psqc11:hover {
110
+ scale: 1.05;
 
 
 
 
 
 
 
111
  transition-duration: 0.3s;
112
  }
 
 
 
 
113
  </style>
114
  """
115
  st.markdown(style_for_page, unsafe_allow_html=True)
 
119
  with st.container():
120
  col0, col1, col2, col3 = st.columns(4)
121
  with col0:
122
+ st.button(
123
+ label=f"{top8.iloc[0].title}",
124
+ key=top8.iloc[0].title,
125
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[0].anime_url),
126
+ use_container_width=True,
127
+ )
128
  st.image(top8.iloc[0].poster, use_column_width=True)
129
  with col1:
130
+ st.button(
131
+ label=f"{top8.iloc[1].title}",
132
+ key=top8.iloc[1].title,
133
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[1].anime_url),
134
+ use_container_width=True,
135
+ )
136
  st.image(top8.iloc[1].poster, use_column_width=True)
137
  with col2:
138
+ st.button(
139
+ label=f"{top8.iloc[2].title}",
140
+ key=top8.iloc[2].title,
141
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[2].anime_url),
142
+ use_container_width=True,
143
+ )
144
  st.image(top8.iloc[2].poster, use_column_width=True)
145
  with col3:
146
+ st.button(
147
+ label=f"{top8.iloc[3].title}",
148
+ key=top8.iloc[3].title,
149
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[3].anime_url),
150
+ use_container_width=True,
151
+ )
152
  st.image(top8.iloc[3].poster, use_column_width=True)
153
 
154
  st.divider()
 
156
  with st.container():
157
  col4, col5, col6, col7 = st.columns(4)
158
  with col4:
159
+ st.button(
160
+ label=f"{top8.iloc[4].title}",
161
+ key=top8.iloc[4].title,
162
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[4].anime_url),
163
+ use_container_width=True,
164
+ )
165
  st.image(top8.iloc[4].poster, use_column_width=True)
166
  with col5:
167
+ st.button(
168
+ label=f"{top8.iloc[5].title}",
169
+ key=top8.iloc[5].title,
170
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[5].anime_url),
171
+ use_container_width=True,
172
+ )
173
  st.image(top8.iloc[5].poster, use_column_width=True)
174
  with col6:
175
+ st.button(
176
+ label=f"{top8.iloc[6].title}",
177
+ key=top8.iloc[6].title,
178
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[6].anime_url),
179
+ use_container_width=True,
180
+ )
181
  st.image(top8.iloc[6].poster, use_column_width=True)
182
  with col7:
183
+ st.button(
184
+ label=f"{top8.iloc[7].title}",
185
+ key=top8.iloc[7].title,
186
+ on_click=lambda: webbrowser.open_new_tab(top8.iloc[7].anime_url),
187
+ use_container_width=True,
188
+ )
189
  st.image(top8.iloc[7].poster, use_column_width=True)
190
 
191
 
 
193
  def top_animes_genres(genre_select):
194
  style_for_page = """
195
  <style>
196
+ .css-c766yy.ef3psqc11 {
197
+ border-radius: 15px;
198
+ text-align: center:
199
+ }
200
+ .css-c766yy.ef3psqc11:hover {
201
+ scale: 1.05;
202
+ transition-duration: 0.3s;
203
+ }
204
+ .css-1v0mbdj.e115fcil1>img {
205
  border-radius: 25px;
206
  }
207
+ button.css-1rgehwv.ef3psqc11 {
208
+ border-radius: 15px;
209
  text-align: center;
210
  }
211
+ button.css-1rgehwv.ef3psqc11:hover {
212
+ scale: 1.05;
 
 
 
 
 
 
 
213
  transition-duration: 0.3s;
214
  }
 
 
 
 
215
  </style>
216
  """
217
  st.markdown(style_for_page, unsafe_allow_html=True)
 
221
  ].sort_values("score", ascending=False)[:8]
222
  col0, col1, col2, col3 = st.columns(4)
223
  with col0:
224
+ st.button(
225
+ label=f"{top_8_genre.iloc[0].title}",
226
+ key=top_8_genre.iloc[0].title,
227
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[0].anime_url),
228
+ use_container_width=True,
229
+ )
230
  st.image(top_8_genre.iloc[0].poster, use_column_width=True)
231
  with col1:
232
+ st.button(
233
+ label=f"{top_8_genre.iloc[1].title}",
234
+ key=top_8_genre.iloc[1].title,
235
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[1].anime_url),
236
+ use_container_width=True,
237
+ )
238
  st.image(top_8_genre.iloc[1].poster, use_column_width=True)
239
  with col2:
240
+ st.button(
241
+ label=f"{top_8_genre.iloc[2].title}",
242
+ key=top_8_genre.iloc[2].title,
243
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[2].anime_url),
244
+ use_container_width=True,
245
+ )
246
  st.image(top_8_genre.iloc[2].poster, use_column_width=True)
247
  with col3:
248
+ st.button(
249
+ label=f"{top_8_genre.iloc[3].title}",
250
+ key=top_8_genre.iloc[3].title,
251
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[3].anime_url),
252
+ use_container_width=True,
253
+ )
254
  st.image(top_8_genre.iloc[3].poster, use_column_width=True)
255
 
256
  st.divider()
257
 
258
  col4, col5, col6, col7 = st.columns(4)
259
  with col4:
260
+ st.button(
261
+ label=f"{top_8_genre.iloc[4].title}",
262
+ key=top_8_genre.iloc[4].title,
263
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[4].anime_url),
264
+ use_container_width=True,
265
+ )
266
  st.image(top_8_genre.iloc[4].poster, use_column_width=True)
267
  with col5:
268
+ st.button(
269
+ label=f"{top_8_genre.iloc[5].title}",
270
+ key=top_8_genre.iloc[5].title,
271
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[5].anime_url),
272
+ use_container_width=True,
273
+ )
274
  st.image(top_8_genre.iloc[5].poster, use_column_width=True)
275
  with col6:
276
+ st.button(
277
+ label=f"{top_8_genre.iloc[6].title}",
278
+ key=top_8_genre.iloc[6].title,
279
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[6].anime_url),
280
+ use_container_width=True,
281
+ )
282
  st.image(top_8_genre.iloc[6].poster, use_column_width=True)
283
  with col7:
284
+ st.button(
285
+ label=f"{top_8_genre.iloc[7].title}",
286
+ key=top_8_genre.iloc[7].title,
287
+ on_click=lambda: webbrowser.open_new_tab(top_8_genre.iloc[7].anime_url),
288
+ use_container_width=True,
289
+ )
290
  st.image(top_8_genre.iloc[7].poster, use_column_width=True)
291
 
292
 
 
294
  def top_animes_custom(anime_select):
295
  style_for_page = """
296
  <style>
297
+ .css-c766yy.ef3psqc11 {
298
+ border-radius: 15px;
299
+ text-align: center:
300
+ }
301
+ .css-c766yy.ef3psqc11:hover {
302
+ scale: 1.05;
303
+ transition-duration: 0.3s;
304
+ }
305
+ .css-1v0mbdj.e115fcil1>img {
306
  border-radius: 25px;
307
  }
308
+ button.css-1rgehwv.ef3psqc11 {
309
+ border-radius: 15px;
310
  text-align: center;
311
  }
312
+ button.css-1rgehwv.ef3psqc11:hover {
313
+ scale: 1.05;
 
 
 
 
 
 
 
314
  transition-duration: 0.3s;
315
  }
 
 
 
 
316
  </style>
317
  """
318
  st.markdown(style_for_page, unsafe_allow_html=True)
 
325
  with st.container():
326
  col0, col1, col2, col3 = st.columns(4)
327
  with col0:
328
+ st.button(
329
+ label=f"{recommended_anime_names[0]}",
330
+ key=recommended_anime_names[0],
331
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[0]),
332
+ use_container_width=True,
333
+ )
334
  st.image(recommended_anime_posters[0], use_column_width=True)
335
  with col1:
336
+ st.button(
337
+ label=f"{recommended_anime_names[1]}",
338
+ key=recommended_anime_names[1],
339
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[1]),
340
+ use_container_width=True,
341
+ )
342
  st.image(recommended_anime_posters[1], use_column_width=True)
343
  with col2:
344
+ st.button(
345
+ label=f"{recommended_anime_names[2]}",
346
+ key=recommended_anime_names[2],
347
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[2]),
348
+ use_container_width=True,
349
+ )
350
  st.image(recommended_anime_posters[2], use_column_width=True)
351
  with col3:
352
+ st.button(
353
+ label=f"{recommended_anime_names[3]}",
354
+ key=recommended_anime_names[3],
355
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[3]),
356
+ use_container_width=True,
357
+ )
358
  st.image(recommended_anime_posters[3], use_column_width=True)
359
 
360
  st.divider()
 
362
  with st.container():
363
  col4, col5, col6, col7 = st.columns(4)
364
  with col4:
365
+ st.button(
366
+ label=f"{recommended_anime_names[4]}",
367
+ key=recommended_anime_names[4],
368
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[4]),
369
+ use_container_width=True,
370
+ )
371
  st.image(recommended_anime_posters[4], use_column_width=True)
372
  with col5:
373
+ st.button(
374
+ label=f"{recommended_anime_names[5]}",
375
+ key=recommended_anime_names[5],
376
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[5]),
377
+ use_container_width=True,
378
+ )
379
  st.image(recommended_anime_posters[5], use_column_width=True)
380
  with col6:
381
+ st.button(
382
+ label=f"{recommended_anime_names[6]}",
383
+ key=recommended_anime_names[6],
384
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[6]),
385
+ use_container_width=True,
386
+ )
387
  st.image(recommended_anime_posters[6], use_column_width=True)
388
  with col7:
389
+ st.button(
390
+ label=f"{recommended_anime_names[7]}",
391
+ key=recommended_anime_names[7],
392
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[7]),
393
+ use_container_width=True,
394
+ )
395
  st.image(recommended_anime_posters[7], use_column_width=True)
396
 
397
 
 
399
  def top_animes_custom_genres(anime_select, genre_select):
400
  style_for_page = """
401
  <style>
402
+ .css-c766yy.ef3psqc11 {
 
 
 
403
  border-radius: 15px;
404
+ text-align: center:
 
 
 
405
  }
406
+ .css-c766yy.ef3psqc11:hover {
407
  scale: 1.05;
408
  transition-duration: 0.3s;
409
  }
410
+ .css-1v0mbdj.e115fcil1>img {
411
+ border-radius: 25px;
412
  }
413
+ button.css-1rgehwv.ef3psqc11 {
414
+ border-radius: 15px;
415
+ text-align: center;
 
 
 
416
  }
417
+ button.css-1rgehwv.ef3psqc11:hover {
418
+ scale: 1.05;
419
  transition-duration: 0.3s;
420
  }
 
 
 
 
421
  </style>
422
  """
423
  st.markdown(style_for_page, unsafe_allow_html=True)
 
430
  with st.container():
431
  col0, col1, col2, col3 = st.columns(4)
432
  with col0:
433
+ st.button(
434
+ label=f"{recommended_anime_names[0]}",
435
+ key=recommended_anime_names[0],
436
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[0]),
437
+ use_container_width=True,
438
+ )
439
  st.image(recommended_anime_posters[0], use_column_width=True)
440
  with col1:
441
+ st.button(
442
+ label=f"{recommended_anime_names[1]}",
443
+ key=recommended_anime_names[1],
444
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[1]),
445
+ use_container_width=True,
446
+ )
447
  st.image(recommended_anime_posters[1], use_column_width=True)
448
  with col2:
449
+ st.button(
450
+ label=f"{recommended_anime_names[2]}",
451
+ key=recommended_anime_names[2],
452
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[2]),
453
+ use_container_width=True,
454
+ )
455
  st.image(recommended_anime_posters[2], use_column_width=True)
456
  with col3:
457
+ st.button(
458
+ label=f"{recommended_anime_names[3]}",
459
+ key=recommended_anime_names[3],
460
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[3]),
461
+ use_container_width=True,
462
+ )
463
  st.image(recommended_anime_posters[3], use_column_width=True)
464
 
465
  st.divider()
 
467
  with st.container():
468
  col4, col5, col6, col7 = st.columns(4)
469
  with col4:
470
+ st.button(
471
+ label=f"{recommended_anime_names[4]}",
472
+ key=recommended_anime_names[4],
473
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[4]),
474
+ use_container_width=True,
475
+ )
476
  st.image(recommended_anime_posters[4], use_column_width=True)
477
  with col5:
478
+ st.button(
479
+ label=f"{recommended_anime_names[5]}",
480
+ key=recommended_anime_names[5],
481
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[5]),
482
+ use_container_width=True,
483
+ )
484
  st.image(recommended_anime_posters[5], use_column_width=True)
485
  with col6:
486
+ st.button(
487
+ label=f"{recommended_anime_names[6]}",
488
+ key=recommended_anime_names[6],
489
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[6]),
490
+ use_container_width=True,
491
+ )
492
  st.image(recommended_anime_posters[6], use_column_width=True)
493
  with col7:
494
+ st.button(
495
+ label=f"{recommended_anime_names[7]}",
496
+ key=recommended_anime_names[7],
497
+ on_click=lambda: webbrowser.open_new_tab(recommended_anime_urls[7]),
498
+ use_container_width=True,
499
+ )
500
  st.image(recommended_anime_posters[7], use_column_width=True)
501
 
502
 
 
504
  def recommender_page():
505
  style_for_page = """
506
  <style>
507
+ button..css-c766yy.ef3psqc11 {
508
+ border-radius: 15px;
509
+ text-align: center:
510
+ }
511
+ st-emotion-cache-c766yy.ef3psqc11 {
512
  border-radius: 10px;
513
  }
514
 
app.py CHANGED
@@ -27,7 +27,7 @@ show_pages(
27
  def home_page():
28
  style_for_page = """
29
  <style>
30
- div.st-emotion-cache-1v0mbdj.e115fcil1>img {
31
  border-radius: 50px;
32
  }
33
  </style>
 
27
  def home_page():
28
  style_for_page = """
29
  <style>
30
+ .css-1v0mbdj.e115fcil1>img {
31
  border-radius: 50px;
32
  }
33
  </style>