Spaces:
Running
Running
File size: 552 Bytes
11ccb1b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import os
# # default cache
default_home = os.path.join(os.path.expanduser("~"), ".cache")
model_cache_home = os.path.expanduser(
os.getenv(
"HF_HOME",
os.path.join(os.getenv("XDG_CACHE_HOME", default_home), "model"),
)
)
class BaseProcessor:
def __init__(self, **kwargs):
self.device = kwargs.get("device") if kwargs.get("device") is not None else "cpu"
self.models_path = kwargs.get("models_path") if kwargs.get("models_path") is not None else model_cache_home
def unload_model(self):
pass
|