cache_path fixed
Browse files
app.py
CHANGED
@@ -85,7 +85,11 @@ class WebApp():
|
|
85 |
|
86 |
|
87 |
def init_interrogator(self):
|
88 |
-
|
|
|
|
|
|
|
|
|
89 |
config.clip_model_name = self.args_base['clip_model_name']
|
90 |
config.caption_model_name = self.args_base['caption_model_name']
|
91 |
self.ci = Interrogator(config)
|
|
|
85 |
|
86 |
|
87 |
def init_interrogator(self):
|
88 |
+
cache_path = os.environ.get('HF_HOME')
|
89 |
+
if cache_path:
|
90 |
+
config = Config(cache_path=cache_path)
|
91 |
+
else:
|
92 |
+
config = Config()
|
93 |
config.clip_model_name = self.args_base['clip_model_name']
|
94 |
config.caption_model_name = self.args_base['caption_model_name']
|
95 |
self.ci = Interrogator(config)
|