Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ import torch
|
|
| 10 |
import os
|
| 11 |
import gradio as gr
|
| 12 |
import numpy as np
|
|
|
|
| 13 |
|
| 14 |
np.float = float
|
| 15 |
np.int = int
|
|
@@ -44,7 +45,7 @@ filename = 'demo.webm'
|
|
| 44 |
|
| 45 |
description = "Yolo model to detect if a person is falling or fallen with deepsort to track how long the subject has fallen.\
|
| 46 |
If the duration crosses a threshold of 5s, the bounding box will turn red and the subject be labelled as IMMOBILE."
|
| 47 |
-
|
| 48 |
def vid_predict(media):
|
| 49 |
|
| 50 |
pipeline = DetectionPipeline(
|
|
|
|
| 10 |
import os
|
| 11 |
import gradio as gr
|
| 12 |
import numpy as np
|
| 13 |
+
import space
|
| 14 |
|
| 15 |
np.float = float
|
| 16 |
np.int = int
|
|
|
|
| 45 |
|
| 46 |
description = "Yolo model to detect if a person is falling or fallen with deepsort to track how long the subject has fallen.\
|
| 47 |
If the duration crosses a threshold of 5s, the bounding box will turn red and the subject be labelled as IMMOBILE."
|
| 48 |
+
@spaces.GPU
|
| 49 |
def vid_predict(media):
|
| 50 |
|
| 51 |
pipeline = DetectionPipeline(
|