vkoottu commited on
Commit
75c0461
·
verified ·
1 Parent(s): 739c26a

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  import json
3
  import tempfile
4
  import numpy as np
@@ -17,7 +18,7 @@ import time
17
 
18
  class EndpointHandler:
19
  def __init__(self, model_dir=None):
20
- self.app = FaceAnalysis()
21
  self.app.prepare(ctx_id=0) # Set to 0 for GPU, or -1 for CPU
22
 
23
  # Get configuration
 
1
  import os
2
+ os.environ["INSIGHTFACE_HOME"] = "/tmp/.insightface"
3
  import json
4
  import tempfile
5
  import numpy as np
 
18
 
19
  class EndpointHandler:
20
  def __init__(self, model_dir=None):
21
+ self.app = FaceAnalysis(root="/tmp/.insightface")
22
  self.app.prepare(ctx_id=0) # Set to 0 for GPU, or -1 for CPU
23
 
24
  # Get configuration