my commit
Browse files
app.py
CHANGED
@@ -11,10 +11,14 @@ def predict(img):
|
|
11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
12 |
|
13 |
title = "Tomatoes Classifier"
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
18 |
enable_queue=True
|
19 |
|
20 |
-
gr.Interface(fn=predict,inputs=
|
|
|
|
|
|
11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
12 |
|
13 |
title = "Tomatoes Classifier"
|
14 |
+
|
15 |
+
image = gr.inputs.Image(shape=(192, 192))
|
16 |
+
label = gr.outputs.Label()
|
17 |
+
examples = ['cherry.jpeg','grape.jpeg', 'roma.jpeg','beefsteak.jpeg','green.jpeg','kumato.jpeg','heirloom.jpeg']
|
18 |
+
|
19 |
+
|
20 |
enable_queue=True
|
21 |
|
22 |
+
intf = gr.Interface(fn=predict, inputs=image, outputs=label, examples=examples)
|
23 |
+
|
24 |
+
intf.launch(inline=False)
|