File size: 641 Bytes
c684f94 5528cae 5a9443d c684f94 cd98c73 6e0c25d c684f94 e6fdcd2 c684f94 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
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")
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()
|