Spaces:
Sleeping
Sleeping
Update app.py
Browse filesUpdated to use hf model instead of repo model
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
-
import gradio as gr
|
2 |
from fastai.vision.all import *
|
|
|
|
|
3 |
import skimage
|
4 |
|
5 |
-
learn =
|
6 |
|
7 |
labels = learn.dls.vocab
|
8 |
def predict(img):
|
@@ -13,7 +14,7 @@ def predict(img):
|
|
13 |
title = "Pet Breed Classifier"
|
14 |
description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo from the course by Jeremy Howard."
|
15 |
article="<p style='text-align: center'><a href='https://course.fast.ai/' target='_blank'>Go to course</a></p>"
|
16 |
-
examples = ['siamese.jpg']
|
17 |
interpretation='default'
|
18 |
enable_queue=True
|
19 |
|
|
|
|
|
1 |
from fastai.vision.all import *
|
2 |
+
from huggingface_hub import push_to_hub_fastai, from_pretrained_fastai
|
3 |
+
import gradio as gr
|
4 |
import skimage
|
5 |
|
6 |
+
learn = from_pretrained_fastai("fastai/ohmeow_chapter_02")
|
7 |
|
8 |
labels = learn.dls.vocab
|
9 |
def predict(img):
|
|
|
14 |
title = "Pet Breed Classifier"
|
15 |
description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo from the course by Jeremy Howard."
|
16 |
article="<p style='text-align: center'><a href='https://course.fast.ai/' target='_blank'>Go to course</a></p>"
|
17 |
+
examples = ['siamese.jpg','pug.jpg']
|
18 |
interpretation='default'
|
19 |
enable_queue=True
|
20 |
|