File size: 305 Bytes
3aad381
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import streamlit as st

def carousel (documents):
  index = 0
  with st.container():
    st.title(f'Document {index + 1} / {len(documents)}')
    if st.button("⬅️") and index > 0:
      index -= 1
    if st.button("➡️") and index < len(documents) - 1:
      index += 1

  st.json(documents[index])