Ricercar commited on
Commit
b79dfdb
1 Parent(s): 99cac7d

cache_path fixed

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -85,7 +85,11 @@ class WebApp():
85
 
86
 
87
  def init_interrogator(self):
88
- config = Config()
 
 
 
 
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)