Spaces:
Sleeping
Sleeping
Sam-Oliveira commited on
Commit ·
4683184
1
Parent(s): a01fde7
change triton cache
Browse files- src/streamlit_app.py +9 -1
src/streamlit_app.py
CHANGED
|
@@ -8,8 +8,16 @@ Streamlit app for the research assistant.
|
|
| 8 |
"""
|
| 9 |
import pathlib, tempfile
|
| 10 |
import os
|
|
|
|
| 11 |
os.environ["XDG_CACHE_HOME"] = str(pathlib.Path(tempfile.gettempdir()) / "hf_cache")
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
import streamlit as st
|
| 14 |
import html as ihtml
|
| 15 |
from datetime import date
|
|
|
|
| 8 |
"""
|
| 9 |
import pathlib, tempfile
|
| 10 |
import os
|
| 11 |
+
CACHE_DIR = pathlib.Path(tempfile.gettempdir()) / "hf_cache"
|
| 12 |
os.environ["XDG_CACHE_HOME"] = str(pathlib.Path(tempfile.gettempdir()) / "hf_cache")
|
| 13 |
+
for var in (
|
| 14 |
+
"HF_HOME",
|
| 15 |
+
"HF_HUB_CACHE",
|
| 16 |
+
"TRANSFORMERS_CACHE",
|
| 17 |
+
"SENTENCE_TRANSFORMERS_HOME",
|
| 18 |
+
):
|
| 19 |
+
os.environ[var] = str(CACHE_DIR)
|
| 20 |
+
|
| 21 |
import streamlit as st
|
| 22 |
import html as ihtml
|
| 23 |
from datetime import date
|