Spaces:
Runtime error
Runtime error
File size: 433 Bytes
53dc0ac 5117e0a 53dc0ac 54b3256 5117e0a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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
|