Spaces:
Running
on
T4
Running
on
T4
drop `spaces` call; use GPU runner for now
Browse files
app.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import spaces
|
| 3 |
import supervision as sv
|
| 4 |
from rfdetr import RFDETRBase, RFDETRLarge
|
| 5 |
from rfdetr.util.coco_classes import COCO_CLASSES
|
|
@@ -41,7 +40,6 @@ VIDEO_TARGET_DIRECTORY = "tmp"
|
|
| 41 |
create_directory(directory_path=VIDEO_TARGET_DIRECTORY)
|
| 42 |
|
| 43 |
|
| 44 |
-
@spaces.GPU()
|
| 45 |
def inference(image, confidence: float, resolution: int, checkpoint: str):
|
| 46 |
model_class = RFDETRBase if checkpoint == "base" else RFDETRLarge
|
| 47 |
model = model_class(resolution=resolution)
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
import supervision as sv
|
| 3 |
from rfdetr import RFDETRBase, RFDETRLarge
|
| 4 |
from rfdetr.util.coco_classes import COCO_CLASSES
|
|
|
|
| 40 |
create_directory(directory_path=VIDEO_TARGET_DIRECTORY)
|
| 41 |
|
| 42 |
|
|
|
|
| 43 |
def inference(image, confidence: float, resolution: int, checkpoint: str):
|
| 44 |
model_class = RFDETRBase if checkpoint == "base" else RFDETRLarge
|
| 45 |
model = model_class(resolution=resolution)
|