Spaces:
Runtime error
Runtime error
jiawenchim
commited on
Commit
•
3613da0
1
Parent(s):
cbda742
Update app.py
Browse files
app.py
CHANGED
@@ -70,6 +70,12 @@ def predict2(image_np):
|
|
70 |
return result_pil_img
|
71 |
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
REPO_ID = "jiawenchim/iti107model"
|
74 |
detection_model = load_model()
|
75 |
# pil_image = Image.open(image_path)
|
@@ -80,5 +86,7 @@ detection_model = load_model()
|
|
80 |
|
81 |
gr.Interface(fn=predict,
|
82 |
inputs=gr.Image(type="pil"),
|
83 |
-
outputs=gr.Image(type="pil")
|
|
|
|
|
84 |
).launch(share=True)
|
|
|
70 |
return result_pil_img
|
71 |
|
72 |
|
73 |
+
# Specify paths to example images
|
74 |
+
sample_images = [["00000031.jpg"], ["00000053.jpg"],
|
75 |
+
["00000057"], ["00000078.jpg"],
|
76 |
+
["00000854.jpg"], ["00000995.jpg"],["00001052.jpg"],["00001444.jpg"],["00001452.jpg"]
|
77 |
+
]
|
78 |
+
|
79 |
REPO_ID = "jiawenchim/iti107model"
|
80 |
detection_model = load_model()
|
81 |
# pil_image = Image.open(image_path)
|
|
|
86 |
|
87 |
gr.Interface(fn=predict,
|
88 |
inputs=gr.Image(type="pil"),
|
89 |
+
outputs=gr.Image(type="pil"),
|
90 |
+
examples=sample_images,
|
91 |
+
title="Object Detection (Battery and Dice)"
|
92 |
).launch(share=True)
|