Ayaz Akkaş commited on
Commit ·
988b00f
1
Parent(s): cbb0852
Add model
Browse files
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
import imp
|
| 2 |
from fastai.vision.all import *
|
| 3 |
import gradio as gr
|
| 4 |
|
|
@@ -6,6 +5,7 @@ import gradio as gr
|
|
| 6 |
learn = load_learner('model.pkl')
|
| 7 |
|
| 8 |
|
|
|
|
| 9 |
def classify_image(img):
|
| 10 |
pred, idx, probs =learn.predict(img)
|
| 11 |
return dict(zip(categories, map(float, probs)))
|
|
|
|
|
|
|
| 1 |
from fastai.vision.all import *
|
| 2 |
import gradio as gr
|
| 3 |
|
|
|
|
| 5 |
learn = load_learner('model.pkl')
|
| 6 |
|
| 7 |
|
| 8 |
+
|
| 9 |
def classify_image(img):
|
| 10 |
pred, idx, probs =learn.predict(img)
|
| 11 |
return dict(zip(categories, map(float, probs)))
|