Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import PIL.Image as Image
|
| 3 |
from ultralytics import YOLO
|
|
|
|
| 4 |
|
|
|
|
| 5 |
def yolo_inference(images, model_id, conf_threshold, iou_threshold, max_detection):
|
| 6 |
model = YOLO(model_id)
|
| 7 |
results = model.predict(
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import PIL.Image as Image
|
| 3 |
from ultralytics import YOLO
|
| 4 |
+
import spaces
|
| 5 |
|
| 6 |
+
@spaces.GPU
|
| 7 |
def yolo_inference(images, model_id, conf_threshold, iou_threshold, max_detection):
|
| 8 |
model = YOLO(model_id)
|
| 9 |
results = model.predict(
|