Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
import PIL.Image as Image
|
2 |
import gradio as gr
|
|
|
3 |
|
4 |
from ultralytics import YOLOv10
|
5 |
|
|
|
6 |
def predict_image(img, model_id, image_size, conf_threshold):
|
7 |
model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
|
8 |
results = model.predict(
|
|
|
1 |
import PIL.Image as Image
|
2 |
import gradio as gr
|
3 |
+
import spaces
|
4 |
|
5 |
from ultralytics import YOLOv10
|
6 |
|
7 |
+
@spaces.GPU
|
8 |
def predict_image(img, model_id, image_size, conf_threshold):
|
9 |
model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
|
10 |
results = model.predict(
|