Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,18 @@ def classify_image(img):
|
|
| 12 |
|
| 13 |
image = gr.Image(shape=(192, 192))
|
| 14 |
label = gr.outputs.Label()
|
| 15 |
-
examples = ['dog.jpg', 'cat.jpg','dunno.jpg']
|
| 16 |
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
-
demo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
image = gr.Image(shape=(192, 192))
|
| 14 |
label = gr.outputs.Label()
|
|
|
|
| 15 |
|
| 16 |
+
demo = gr.Interface(fn=classify_image, inputs=image, outputs=label)
|
| 17 |
+
# demo.launch()
|
| 18 |
|
| 19 |
+
|
| 20 |
+
# demo = gr.Interface(
|
| 21 |
+
# fn = classify_image,
|
| 22 |
+
# inputs=gr.Image(type='pil'),
|
| 23 |
+
# outputs=[gr.Textbox(label="Predicted Label"), gr.Image(label="Labeled Image")],
|
| 24 |
+
# title="Image Classification App",
|
| 25 |
+
# description="Upload an image and get the predicted label and labeled image."
|
| 26 |
+
|
| 27 |
+
# )
|
| 28 |
+
if __name__ == "__main__":
|
| 29 |
+
demo.launch(share=True)
|