Kevin King commited on
Commit
1e773b8
·
1 Parent(s): f596015

refactor: update requirements and set environment variables for model caching

Browse files
Files changed (2) hide show
  1. requirements.txt +3 -1
  2. src/streamlit_app.py +5 -0
requirements.txt CHANGED
@@ -1,7 +1,9 @@
1
  --extra-index-url https://download.pytorch.org/whl/cpu
2
 
3
- # Core app and UI library
4
  streamlit==1.35.0
 
 
5
 
6
  # Library for video/audio file handling
7
  moviepy
 
1
  --extra-index-url https://download.pytorch.org/whl/cpu
2
 
3
+ # Pin the main UI components to recent, stable versions
4
  streamlit==1.35.0
5
+ # streamlit-camera removed as st.camera_input is native
6
+ streamlit-autorefresh==1.0.1
7
 
8
  # Library for video/audio file handling
9
  moviepy
src/streamlit_app.py CHANGED
@@ -1,5 +1,10 @@
1
  import os
2
  import streamlit as st
 
 
 
 
 
3
  import numpy as np
4
  import torch
5
  import whisper
 
1
  import os
2
  import streamlit as st
3
+
4
+ # Set home directories for model caching to the writable /tmp folder
5
+ os.environ['DEEPFACE_HOME'] = '/tmp/.deepface'
6
+ os.environ['HF_HOME'] = '/tmp/huggingface'
7
+
8
  import numpy as np
9
  import torch
10
  import whisper