Kevin King commited on
Commit
19fdec5
·
1 Parent(s): c4f9f88

fix: update model caching directories to use /tmp for guaranteed write access

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -3
src/streamlit_app.py CHANGED
@@ -1,9 +1,9 @@
1
  import os
2
  import streamlit as st
3
 
4
- # Set home directories for model caching inside the app's writable directory
5
- os.environ['DEEPFACE_HOME'] = '/app/.deepface'
6
- os.environ['TRANSFORMERS_CACHE'] = '/app/.cache/huggingface'
7
 
8
  from streamlit_webrtc import webrtc_streamer, WebRtcMode, RTCConfiguration
9
  import av
 
1
  import os
2
  import streamlit as st
3
 
4
+ # Point cache directories to the guaranteed writable /tmp folder
5
+ os.environ['DEEPFACE_HOME'] = '/tmp/.deepface'
6
+ os.environ['HF_HOME'] = '/tmp/huggingface'
7
 
8
  from streamlit_webrtc import webrtc_streamer, WebRtcMode, RTCConfiguration
9
  import av