Spaces:
Runtime error
Runtime error
Commit ·
597f7a6
1
Parent(s): ce2be03
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
print(Interface)
|
| 3 |
-
from gradio.components import Image, Label
|
| 4 |
from fastai.vision.all import *
|
| 5 |
import skimage
|
| 6 |
|
|
@@ -18,5 +16,5 @@ def predict(img):
|
|
| 18 |
title = "Pet Breed Classifier"
|
| 19 |
description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
| 20 |
|
| 21 |
-
iface = Interface(fn=predict,
|
| 22 |
iface.launch()
|
|
|
|
| 1 |
+
import gradio as gr
|
|
|
|
|
|
|
| 2 |
from fastai.vision.all import *
|
| 3 |
import skimage
|
| 4 |
|
|
|
|
| 16 |
title = "Pet Breed Classifier"
|
| 17 |
description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
| 18 |
|
| 19 |
+
iface = gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description)
|
| 20 |
iface.launch()
|