spatel54 commited on
Commit
1c20626
·
verified ·
1 Parent(s): 7be56db

Fixing permissions denied issue

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +12 -0
src/streamlit_app.py CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Imports.
2
  import streamlit as st
3
  import seaborn as sns
 
1
+ import os
2
+ from pathlib import Path
3
+
4
+ # point Streamlit at a writable folder
5
+ os.environ["STREAMLIT_CONFIG_DIR"] = "/tmp/.streamlit"
6
+ Path(os.environ["STREAMLIT_CONFIG_DIR"]).mkdir(parents=True, exist_ok=True)
7
+
8
+ import streamlit as st
9
+ # …the rest of your imports and code…
10
+
11
+
12
+
13
  # Imports.
14
  import streamlit as st
15
  import seaborn as sns