danidanidani commited on
Commit
3605db7
·
1 Parent(s): 5067655

Add startup script to fix OMP_NUM_THREADS before Streamlit starts

Browse files
Files changed (1) hide show
  1. startup.sh +8 -0
startup.sh ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Fix HuggingFace Spaces OMP_NUM_THREADS issue
3
+ if [[ "$OMP_NUM_THREADS" == *"m" ]]; then
4
+ export OMP_NUM_THREADS=4
5
+ fi
6
+
7
+ # Start Streamlit
8
+ streamlit run app.py