Spaces:
Sleeping
Sleeping
Chong-U Lim
commited on
Commit
·
c2a1944
1
Parent(s):
a671552
Update
Browse files- app.py +3 -3
- requirements.txt +0 -1
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
__all__ = ['is_cat', 'learn', 'classify_image', 'categories', 'image', 'label', 'examples', 'intf']
|
2 |
|
3 |
-
from fastai.vision.all import
|
4 |
import gradio as gr
|
5 |
|
6 |
def is_cat(x): return x[0].isupper()
|
@@ -13,8 +13,8 @@ def classify_image(img):
|
|
13 |
pred, idx, probs = learn.predict(img)
|
14 |
return dict(zip(categories, map(float, probs)))
|
15 |
|
16 |
-
image = gr.
|
17 |
-
label = gr.
|
18 |
|
19 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
20 |
|
|
|
1 |
__all__ = ['is_cat', 'learn', 'classify_image', 'categories', 'image', 'label', 'examples', 'intf']
|
2 |
|
3 |
+
from fastai.vision.all import load_learner
|
4 |
import gradio as gr
|
5 |
|
6 |
def is_cat(x): return x[0].isupper()
|
|
|
13 |
pred, idx, probs = learn.predict(img)
|
14 |
return dict(zip(categories, map(float, probs)))
|
15 |
|
16 |
+
image = gr.components.Image(shape=(192,192))
|
17 |
+
label = gr.components.label()
|
18 |
|
19 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
20 |
|
requirements.txt
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
gradio==3.50
|
2 |
fastai
|
|
|
|
|
1 |
fastai
|