Spaces:
Sleeping
Sleeping
Commit
•
cbc2dd6
1
Parent(s):
1ded52c
Add code
Browse files
app.py
CHANGED
@@ -13,8 +13,8 @@ def yolov10_inference(image, conf_threshold):
|
|
13 |
start = time.time()
|
14 |
results = model.predict(source=image, imgsz=width, conf=conf_threshold)
|
15 |
end = time.time()
|
16 |
-
print("time", end - start)
|
17 |
annotated_image = results[0].plot()
|
|
|
18 |
return annotated_image[:, :, ::-1]
|
19 |
|
20 |
|
@@ -49,7 +49,7 @@ with gr.Blocks(css=css) as app:
|
|
49 |
fn=yolov10_inference,
|
50 |
inputs=[image, conf_threshold],
|
51 |
outputs=[image],
|
52 |
-
stream_every=0.
|
53 |
time_limit=30
|
54 |
)
|
55 |
|
|
|
13 |
start = time.time()
|
14 |
results = model.predict(source=image, imgsz=width, conf=conf_threshold)
|
15 |
end = time.time()
|
|
|
16 |
annotated_image = results[0].plot()
|
17 |
+
print("time", end - start)
|
18 |
return annotated_image[:, :, ::-1]
|
19 |
|
20 |
|
|
|
49 |
fn=yolov10_inference,
|
50 |
inputs=[image, conf_threshold],
|
51 |
outputs=[image],
|
52 |
+
stream_every=0.1,
|
53 |
time_limit=30
|
54 |
)
|
55 |
|