Spaces:
Runtime error
Runtime error
import os | |
import streamlit as st | |
data_dir = os.path.join(os.path.dirname(__file__), '..', 'data') | |
config_dir = os.path.join(os.path.dirname(__file__), '..', 'config') | |
def hf_api_token() -> str: | |
#TODO: Need to consider how to make this more generic to look for a token elsewhere | |
token = st.secrets['hf_token'] | |
if token is None: | |
raise ValueError('No HF access token found in streamlit secrets') | |
return token | |