I’m deploying an app with a custom font. Locally the font loads fine with the syntax below. I copied the font.css to the static folder as explained int this post. Does anyone have an idea on how to solve this?
with open( "font.css" ) as css:
st.markdown( f'<style>{css.read()}</style>' , unsafe_allow_html= True)
When deploying the app on Streamlit Cloud I get the following error with Traceback (most recent call last):
- File “/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 535, in _run_script exec(code, module.dict)
- File “/mount/src/final-project/package/app.py”, line 9, in
with open( “font.css” ) as css: - FileNotFoundError: [Errno 2] No such file or directory: ‘font.css’
Link to full app script.