cptsubtext
commited on
Commit
·
38da6b8
1
Parent(s):
c5caf73
another fix for permission issue
Browse files
app.py
CHANGED
@@ -1,14 +1,12 @@
|
|
1 |
import os
|
2 |
-
|
3 |
-
# Fix for Hugging Face Spaces / Streamlit permission issues
|
4 |
os.environ["STREAMLIT_CONFIG_DIR"] = "/tmp/.streamlit"
|
5 |
os.environ["STREAMLIT_CACHE_DIR"] = "/tmp/.cache"
|
6 |
-
os.environ["STREAMLIT_DISABLE_LOGGING"] = "1"
|
7 |
-
os.environ["STREAMLIT_LOG_LEVEL"] = "error"
|
8 |
os.makedirs("/tmp/.streamlit", exist_ok=True)
|
9 |
os.makedirs("/tmp/.cache", exist_ok=True)
|
10 |
|
11 |
import streamlit as st
|
|
|
12 |
import json
|
13 |
from PIL import Image
|
14 |
from transformers import LlavaForConditionalGeneration, AutoProcessor
|
|
|
1 |
import os
|
2 |
+
# Fix for permission errors in Hugging Face Spaces
|
|
|
3 |
os.environ["STREAMLIT_CONFIG_DIR"] = "/tmp/.streamlit"
|
4 |
os.environ["STREAMLIT_CACHE_DIR"] = "/tmp/.cache"
|
|
|
|
|
5 |
os.makedirs("/tmp/.streamlit", exist_ok=True)
|
6 |
os.makedirs("/tmp/.cache", exist_ok=True)
|
7 |
|
8 |
import streamlit as st
|
9 |
+
import os
|
10 |
import json
|
11 |
from PIL import Image
|
12 |
from transformers import LlavaForConditionalGeneration, AutoProcessor
|