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() # 'cpu' | |
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") | |
if __name__ == "__main__": | |
st.set_page_config(page_title="Sticky Header test", layout="wide") | |
setup_page() | |