DurgaDeepak commited on
Commit
49d2559
·
verified ·
1 Parent(s): 2d3bb12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -60,17 +60,18 @@ MAX_IMAGE_RES = (1920, 1080)
60
  MAX_VIDEO_MB = 50
61
  MAX_VIDEO_DURATION = 30 # seconds
62
 
63
- @spaces.GPU
64
- def preload_models():
65
- """
66
- This function is needed to activate ZeroGPU. It must be decorated with @spaces.GPU.
67
- It can be used to warm up models or load them into memory.
68
- """
69
- from registry import get_model
70
- print("Warming up models for ZeroGPU...")
71
- get_model("detection", "yolov5n-seg", device="cpu")
72
- get_model("segmentation", "deeplabv3_resnet50", device="cpu")
73
- get_model("depth", "midas_v21_small_256", device="cpu")
 
74
 
75
 
76
  # Utility Functions
 
60
  MAX_VIDEO_MB = 50
61
  MAX_VIDEO_DURATION = 30 # seconds
62
 
63
+
64
+ # @spaces.GPU
65
+ # def preload_models():
66
+ # """
67
+ # This function is needed to activate ZeroGPU. It must be decorated with @spaces.GPU.
68
+ # It can be used to warm up models or load them into memory.
69
+ # """
70
+ # from registry import get_model
71
+ # print("Warming up models for ZeroGPU...")
72
+ # get_model("detection", "yolov5n-seg", device="cpu")
73
+ # get_model("segmentation", "deeplabv3_resnet50", device="cpu")
74
+ # get_model("depth", "midas_v21_small_256", device="cpu")
75
 
76
 
77
  # Utility Functions