Hansimov commited on
Commit
93e2e2a
1 Parent(s): d933dd0

:boom: [Fix] Permission denied when saving onnx model

Browse files
Files changed (2) hide show
  1. configs/info.json +1 -1
  2. transforms/embed.py +2 -1
configs/info.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "version": "0.2",
3
  "app_name": "Embedding API",
4
  "server": "0.0.0.0",
5
  "port": 16666
 
1
  {
2
+ "version": "0.2.1",
3
  "app_name": "Embedding API",
4
  "server": "0.0.0.0",
5
  "port": 16666
transforms/embed.py CHANGED
@@ -33,7 +33,8 @@ class JinaAIOnnxEmbedder:
33
  self.load_model()
34
 
35
  def download_model(self):
36
- self.onnx_folder = Path(__file__).parent
 
37
  self.onnx_filename = "onnx/model_quantized.onnx"
38
  self.onnx_path = self.onnx_folder / self.onnx_filename
39
  if not self.onnx_path.exists():
 
33
  self.load_model()
34
 
35
  def download_model(self):
36
+ self.onnx_folder = Path(__file__).parents[2] / ".cache"
37
+ self.onnx_folder.mkdir(parents=True, exist_ok=True)
38
  self.onnx_filename = "onnx/model_quantized.onnx"
39
  self.onnx_path = self.onnx_folder / self.onnx_filename
40
  if not self.onnx_path.exists():