new path
Browse files
app.py
CHANGED
@@ -2,13 +2,10 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
4 |
|
5 |
-
|
6 |
learn = load_learner('ufo-model.pkl')
|
7 |
|
8 |
-
|
9 |
labels = learn.dls.vocab
|
10 |
|
11 |
-
|
12 |
def predict(img):
|
13 |
img = PILImage.create(img)
|
14 |
pred,pred_idx,probs = learn.predict(img)
|
@@ -18,7 +15,7 @@ def predict(img):
|
|
18 |
title = "UFO vs Star Classifier"
|
19 |
description = "A Ufo classifier trained on the Duck Duck Go search dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
20 |
article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
|
21 |
-
examples = ['ufo.webp']
|
22 |
interpretation='default'
|
23 |
enable_queue=True
|
24 |
|
|
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
4 |
|
|
|
5 |
learn = load_learner('ufo-model.pkl')
|
6 |
|
|
|
7 |
labels = learn.dls.vocab
|
8 |
|
|
|
9 |
def predict(img):
|
10 |
img = PILImage.create(img)
|
11 |
pred,pred_idx,probs = learn.predict(img)
|
|
|
15 |
title = "UFO vs Star Classifier"
|
16 |
description = "A Ufo classifier trained on the Duck Duck Go search dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
17 |
article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
|
18 |
+
examples = ['ufo.webp', 'star.webp', 'ufo2.webp']
|
19 |
interpretation='default'
|
20 |
enable_queue=True
|
21 |
|