Spaces:
Runtime error
Runtime error
Commit
·
f940e4d
1
Parent(s):
b8b3774
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,12 @@ from sahi.prediction import ObjectPrediction
|
|
| 4 |
from sahi.utils.cv import visualize_object_predictions, read_image
|
| 5 |
from ultralyticsplus import YOLO, render_result
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
def yolov8_inference(
|
| 8 |
image: gr.inputs.Image = None,
|
| 9 |
model_path: gr.inputs.Dropdown = None,
|
|
@@ -51,8 +57,8 @@ demo_app = gr.Interface(
|
|
| 51 |
inputs=inputs,
|
| 52 |
outputs=outputs,
|
| 53 |
title=title,
|
| 54 |
-
|
| 55 |
-
cache_examples=
|
| 56 |
theme='huggingface',
|
| 57 |
)
|
| 58 |
demo_app.launch(debug=True, enable_queue=True)
|
|
|
|
| 4 |
from sahi.utils.cv import visualize_object_predictions, read_image
|
| 5 |
from ultralyticsplus import YOLO, render_result
|
| 6 |
|
| 7 |
+
image_path = [
|
| 8 |
+
['test/web form.jpg', 'foduucom/web-form-ui-field-detection', 640, 0.25, 0.45],
|
| 9 |
+
['test/web form2.jpg', 'foduucom/web-form-ui-field-detection', 640, 0.25, 0.45]
|
| 10 |
+
]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
def yolov8_inference(
|
| 14 |
image: gr.inputs.Image = None,
|
| 15 |
model_path: gr.inputs.Dropdown = None,
|
|
|
|
| 57 |
inputs=inputs,
|
| 58 |
outputs=outputs,
|
| 59 |
title=title,
|
| 60 |
+
examples=image_path,
|
| 61 |
+
cache_examples=False,
|
| 62 |
theme='huggingface',
|
| 63 |
)
|
| 64 |
demo_app.launch(debug=True, enable_queue=True)
|