Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ class CrowdDetection:
|
|
12 |
self.model_path = model_path
|
13 |
|
14 |
@spaces.GPU
|
15 |
-
def
|
16 |
try:
|
17 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
18 |
if not os.path.exists(self.model_path):
|
@@ -131,7 +131,7 @@ class FallDetection:
|
|
131 |
self.model_path = yolo_model_path
|
132 |
|
133 |
@spaces.GPU
|
134 |
-
def
|
135 |
try:
|
136 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
137 |
if not os.path.exists(self.model_path):
|
@@ -196,7 +196,7 @@ class FightDetection:
|
|
196 |
self.model_path = yolo_model_path
|
197 |
|
198 |
@spaces.GPU
|
199 |
-
def
|
200 |
try:
|
201 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
202 |
if not os.path.exists(self.model_path):
|
|
|
12 |
self.model_path = model_path
|
13 |
|
14 |
@spaces.GPU
|
15 |
+
def crowd_detect(self, video_path):
|
16 |
try:
|
17 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
18 |
if not os.path.exists(self.model_path):
|
|
|
131 |
self.model_path = yolo_model_path
|
132 |
|
133 |
@spaces.GPU
|
134 |
+
def fall_detect(self, video_path):
|
135 |
try:
|
136 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
137 |
if not os.path.exists(self.model_path):
|
|
|
196 |
self.model_path = yolo_model_path
|
197 |
|
198 |
@spaces.GPU
|
199 |
+
def fight_detect(self, video_path):
|
200 |
try:
|
201 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
202 |
if not os.path.exists(self.model_path):
|