Spaces:
Runtime error
Runtime error
update
Browse files- app.py +4 -1
- samples/basking.jpg +0 -0
- samples/black tip.jpg +0 -0
- samples/blue.jpg +0 -0
- samples/bull.jpg +0 -0
- samples/hammer head.jpg +0 -0
- samples/lemon.jpg +0 -0
- samples/mako.jpg +0 -0
- samples/nurse.jpg +0 -0
- samples/sand tiger.jpg +0 -0
- samples/thresher.jpg +0 -0
- samples/tigre.jpg +0 -0
- samples/whale.jpg +0 -0
- samples/white tip.jpg +0 -0
- samples/white.jpg +0 -0
app.py
CHANGED
@@ -57,6 +57,8 @@ def predict_image(image, model_name):
|
|
57 |
|
58 |
image = gr.inputs.Image(shape=(300, 300), label="Upload Your Image Here")
|
59 |
label = gr.outputs.Label(num_top_classes=len(labels))
|
|
|
|
|
60 |
|
61 |
interface = gr.Interface(
|
62 |
fn=predict_image,
|
@@ -65,6 +67,7 @@ interface = gr.Interface(
|
|
65 |
capture_session=True,
|
66 |
allow_flagging=False,
|
67 |
title=“🦈 Shark image classifier”,
|
68 |
-
description="Made with HugsVision & ❤️"
|
|
|
69 |
)
|
70 |
interface.launch()
|
|
|
57 |
|
58 |
image = gr.inputs.Image(shape=(300, 300), label="Upload Your Image Here")
|
59 |
label = gr.outputs.Label(num_top_classes=len(labels))
|
60 |
+
|
61 |
+
samples = [["samples/" + p + "/jpg"] for p in labels]
|
62 |
|
63 |
interface = gr.Interface(
|
64 |
fn=predict_image,
|
|
|
67 |
capture_session=True,
|
68 |
allow_flagging=False,
|
69 |
title=“🦈 Shark image classifier”,
|
70 |
+
description="Made with HugsVision & ❤️",
|
71 |
+
examples=samples
|
72 |
)
|
73 |
interface.launch()
|
samples/basking.jpg
ADDED
samples/black tip.jpg
ADDED
samples/blue.jpg
ADDED
samples/bull.jpg
ADDED
samples/hammer head.jpg
ADDED
samples/lemon.jpg
ADDED
samples/mako.jpg
ADDED
samples/nurse.jpg
ADDED
samples/sand tiger.jpg
ADDED
samples/thresher.jpg
ADDED
samples/tigre.jpg
ADDED
samples/whale.jpg
ADDED
samples/white tip.jpg
ADDED
samples/white.jpg
ADDED