Spaces:
Runtime error
Runtime error
Pengyu-gis
commited on
Commit
β’
922f682
1
Parent(s):
a7f9471
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ article = f"<p style='text-align: center'> <a href='https://huggingface.co/{mode
|
|
11 |
current_model_id = models_ids[-1]
|
12 |
model = yolov5.load(current_model_id)
|
13 |
|
14 |
-
examples = [['test_images/biodegradable26_jpg.rf.8a913791d009e2fab0a2e6fe09354e42.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/biodegradable545_jpg.rf.221b16c94387b66692f4e25e3c67c662.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/biodegradable89_jpg.rf.2097a8a4f14b2d8e7ac994ed5fdc13a9.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/cardboard1696_jpg.rf.c7d8edf6d266cb501f877f5d129ca32a.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/glass1467_jpg.rf.d2f0a3ed76205c01fc26c555680ddc81.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/glass887_jpg.rf.8993139c864267e74f501703b5a02a1b.jpg', 0.25, 'keremberke/yolov5m-garbage']]
|
15 |
|
16 |
|
17 |
def predict(image, threshold=0.25, model_id=None):
|
@@ -47,6 +47,6 @@ gr.Interface(
|
|
47 |
gr.Dropdown(models_ids, value=models_ids[-1]),
|
48 |
],
|
49 |
outputs=gr.Image(type="pil"),
|
50 |
-
examples=examples,
|
51 |
-
cache_examples=True if examples else False,
|
52 |
).launch(enable_queue=True)
|
|
|
11 |
current_model_id = models_ids[-1]
|
12 |
model = yolov5.load(current_model_id)
|
13 |
|
14 |
+
# examples = [['test_images/biodegradable26_jpg.rf.8a913791d009e2fab0a2e6fe09354e42.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/biodegradable545_jpg.rf.221b16c94387b66692f4e25e3c67c662.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/biodegradable89_jpg.rf.2097a8a4f14b2d8e7ac994ed5fdc13a9.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/cardboard1696_jpg.rf.c7d8edf6d266cb501f877f5d129ca32a.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/glass1467_jpg.rf.d2f0a3ed76205c01fc26c555680ddc81.jpg', 0.25, 'keremberke/yolov5m-garbage'], ['test_images/glass887_jpg.rf.8993139c864267e74f501703b5a02a1b.jpg', 0.25, 'keremberke/yolov5m-garbage']]
|
15 |
|
16 |
|
17 |
def predict(image, threshold=0.25, model_id=None):
|
|
|
47 |
gr.Dropdown(models_ids, value=models_ids[-1]),
|
48 |
],
|
49 |
outputs=gr.Image(type="pil"),
|
50 |
+
# examples=examples,
|
51 |
+
# cache_examples=True if examples else False,
|
52 |
).launch(enable_queue=True)
|