Update app.py
Browse files
app.py
CHANGED
@@ -20,4 +20,18 @@ examples = ['siamese.jpg']
|
|
20 |
interpretation='default'
|
21 |
enable_queue=True
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
interpretation='default'
|
21 |
enable_queue=True
|
22 |
|
23 |
+
image = gr.Image(height=192, width=192)
|
24 |
+
label = gr.Label(num_top_classes=3)
|
25 |
+
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
26 |
+
|
27 |
+
intf = gr.Interface(
|
28 |
+
fn=predict,
|
29 |
+
inputs=image,
|
30 |
+
outputs=label,
|
31 |
+
examples=examples,
|
32 |
+
title='Cat or Dog Classifier',
|
33 |
+
description='This is a cat or dog classifier. Upload an image of a cat or dog and it will predict which it is.'
|
34 |
+
)
|
35 |
+
intf.launch()
|
36 |
+
|
37 |
+
# gr.Interface(fn=predict,inputs=gr.components.Image(height=512, width=512),outputs=gr.components.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
|