|
import os |
|
import streamlit as st |
|
import torch |
|
import pandas as pd |
|
|
|
def get_device_map() -> str: |
|
return 'cuda' if torch.cuda.is_available() else 'cpu' |
|
device = get_device_map() |
|
|
|
def setup_page(): |
|
with st.spinner("In progress..."): |
|
hf_token = os.getenv('HF_TOKEN') |
|
df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows_with_total.csv") |
|
st.image("images/SBS_Chapter_Index.png", use_container_width=True) |
|
st.subheader("Select specific Chapter for quicker results") |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
st.set_page_config(page_title="Sticky Header test", layout="wide") |
|
setup_page() |
|
|