Spaces:
Sleeping
Sleeping
trminhnam20082002
commited on
Commit
•
9922ab1
1
Parent(s):
8b57e03
fix
Browse files- st_utils.py +2 -2
st_utils.py
CHANGED
@@ -93,7 +93,7 @@ class CONFIG:
|
|
93 |
|
94 |
|
95 |
# download model with streamlit cache decorator
|
96 |
-
@st.cache(persist=False, show_spinner=True)
|
97 |
def download_model():
|
98 |
if not os.path.exists(r"models/pytorch_model.bin"):
|
99 |
os.makedirs("./models", exist_ok=True)
|
@@ -108,7 +108,7 @@ def download_model():
|
|
108 |
|
109 |
|
110 |
# load with streamlit cache decorator
|
111 |
-
@st.cache(persist=False, show_spinner=True)
|
112 |
def load_tokenizer_and_model(pretrained_path):
|
113 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
114 |
|
|
|
93 |
|
94 |
|
95 |
# download model with streamlit cache decorator
|
96 |
+
@st.cache(persist=False, show_spinner=True, allow_output_mutation=True)
|
97 |
def download_model():
|
98 |
if not os.path.exists(r"models/pytorch_model.bin"):
|
99 |
os.makedirs("./models", exist_ok=True)
|
|
|
108 |
|
109 |
|
110 |
# load with streamlit cache decorator
|
111 |
+
@st.cache(persist=False, show_spinner=True, allow_output_mutation=True)
|
112 |
def load_tokenizer_and_model(pretrained_path):
|
113 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
114 |
|