Podtekatel commited on
Commit
20428be
1 Parent(s): 3b087bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -4,7 +4,7 @@ import os
4
  import gradio as gr
5
  import numpy as np
6
  from PIL import Image
7
- from huggingface_hub import hf_hub_url, cached_download
8
 
9
  from inference.face_detector import StatRetinaFaceDetector
10
  from inference.model_pipeline import VSNetModelPipeline
@@ -25,9 +25,7 @@ def load_model():
25
  global pipeline_old
26
 
27
  # Old model
28
- model_path = cached_download(
29
- hf_hub_url(REPO_ID, FILENAME_OLD), use_auth_token=os.getenv('HF_TOKEN')
30
- )
31
  model_old = ONNXModel(model_path)
32
 
33
  pipeline_old = VSNetModelPipeline(model_old, StatRetinaFaceDetector(MODEL_IMG_SIZE), background_resize=1024, no_detected_resize=1024)
 
4
  import gradio as gr
5
  import numpy as np
6
  from PIL import Image
7
+ from huggingface_hub import hf_hub_url, hf_hub_download
8
 
9
  from inference.face_detector import StatRetinaFaceDetector
10
  from inference.model_pipeline import VSNetModelPipeline
 
25
  global pipeline_old
26
 
27
  # Old model
28
+ model_path = hf_hub_download(REPO_ID, FILENAME_OLD), use_auth_token=os.getenv('HF_TOKEN')
 
 
29
  model_old = ONNXModel(model_path)
30
 
31
  pipeline_old = VSNetModelPipeline(model_old, StatRetinaFaceDetector(MODEL_IMG_SIZE), background_resize=1024, no_detected_resize=1024)