lenawilli commited on
Commit
cf7f179
·
verified ·
1 Parent(s): 7f97bdd

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +4 -2
src/streamlit_app.py CHANGED
@@ -307,7 +307,9 @@ elif search_query:
307
  st.warning("No movies found.")
308
  else:
309
  for _, movie in filtered.iterrows():
310
- with st.expander(f"{movie['clean_title']}"):
 
 
311
  col1, col2 = st.columns([1, 3])
312
  with col1:
313
  poster_url, _ = get_tmdb_data(movie["clean_title"], movie["year"])
@@ -320,7 +322,7 @@ elif search_query:
320
  with col2:
321
  st.markdown(f"**Genres:** {movie['genres']}")
322
  st.markdown(f"**Year:** {movie['year']}")
323
- st.markdown(f"[Details](/?movie_id={movie['movieId']})", unsafe_allow_html=True)
324
  else:
325
  st.title("Welcome to Movie Recommender")
326
 
 
307
  st.warning("No movies found.")
308
  else:
309
  for _, movie in filtered.iterrows():
310
+ expander_html_id = f"expander_{movie['movieId']}"
311
+ with st.expander(f"{movie['clean_title']}", expanded=False):
312
+ st.markdown(f"<style>#{expander_html_id} {{ background-color: #2a2a2a; border-left: 4px solid #b32d2e; padding: 10px; }}</style>", unsafe_allow_html=True)
313
  col1, col2 = st.columns([1, 3])
314
  with col1:
315
  poster_url, _ = get_tmdb_data(movie["clean_title"], movie["year"])
 
322
  with col2:
323
  st.markdown(f"**Genres:** {movie['genres']}")
324
  st.markdown(f"**Year:** {movie['year']}")
325
+ st.markdown(f"[🔍 Details](/?movie_id={movie['movieId']})", unsafe_allow_html=True)
326
  else:
327
  st.title("Welcome to Movie Recommender")
328