Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
|
|
4 |
from fastai.vision.all import *
|
5 |
import skimage
|
6 |
|
7 |
-
learn = load_learner('
|
8 |
|
9 |
labels = learn.dls.vocab
|
10 |
def predict(img):
|
@@ -14,6 +14,6 @@ def predict(img):
|
|
14 |
|
15 |
# Create and launch the Gradio interface
|
16 |
title = "Pet Breed Classifier"
|
17 |
-
examples = ['
|
18 |
description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
19 |
gr.Interface(fn=predict, inputs="image", outputs="label", title=title, description=description, examples=examples).launch(share=True)
|
|
|
4 |
from fastai.vision.all import *
|
5 |
import skimage
|
6 |
|
7 |
+
learn = load_learner('export.pkl')
|
8 |
|
9 |
labels = learn.dls.vocab
|
10 |
def predict(img):
|
|
|
14 |
|
15 |
# Create and launch the Gradio interface
|
16 |
title = "Pet Breed Classifier"
|
17 |
+
examples = ['beagle.jpeg']
|
18 |
description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
19 |
gr.Interface(fn=predict, inputs="image", outputs="label", title=title, description=description, examples=examples).launch(share=True)
|