DurgaDeepak commited on
Commit
921b5bc
·
verified ·
1 Parent(s): c5b802f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -69,16 +69,16 @@ MAX_VIDEO_DURATION = 15 # seconds
69
 
70
 
71
  @spaces.GPU
72
- def preload_models():
73
- """
74
- This function is needed to activate ZeroGPU. It must be decorated with @spaces.GPU.
75
- It can be used to warm up models or load them into memory.
76
- """
77
- from registry import get_model
78
- print("Warming up models for ZeroGPU...")
79
- get_model("detection", "yolov8n", device="cpu")
80
- get_model("segmentation", "deeplabv3_resnet50", device="cpu")
81
- get_model("depth", "midas_v21_small_256", device="cpu")
82
 
83
  def handle(mode, media_upload, url,
84
  run_det, det_model, det_confidence,
 
69
 
70
 
71
  @spaces.GPU
72
+ # def preload_models():
73
+ # """
74
+ # This function is needed to activate ZeroGPU. It must be decorated with @spaces.GPU.
75
+ # It can be used to warm up models or load them into memory.
76
+ # """
77
+ # from registry import get_model
78
+ # print("Warming up models for ZeroGPU...")
79
+ # get_model("detection", "yolov8n", device="cpu")
80
+ # get_model("segmentation", "deeplabv3_resnet50", device="cpu")
81
+ # get_model("depth", "midas_v21_small_256", device="cpu")
82
 
83
  def handle(mode, media_upload, url,
84
  run_det, det_model, det_confidence,