Spaces:
Runtime error
Runtime error
Update app.py
#2
by
Martyt
- opened
app.py
CHANGED
|
@@ -3,9 +3,9 @@ __all__ = ['learn', 'classify_image', 'categories', 'image', 'label', 'intf']
|
|
| 3 |
from fastai.vision.all import *
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
-
learn = load_learner('export.pkl')
|
| 7 |
|
| 8 |
-
categories = ('Dog Destroying Stuff','
|
| 9 |
def classify_image(img):
|
| 10 |
pred, idx, probs = learn.predict(img)
|
| 11 |
return dict(zip(categories, map(float, probs)))
|
|
|
|
| 3 |
from fastai.vision.all import *
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
+
learn = load_learner('export (3).pkl')
|
| 7 |
|
| 8 |
+
categories = ('Dog Destroying Stuff','Neutral')
|
| 9 |
def classify_image(img):
|
| 10 |
pred, idx, probs = learn.predict(img)
|
| 11 |
return dict(zip(categories, map(float, probs)))
|