ofirgaash commited on
Commit
acd4da4
1 Parent(s): e449490

initial commit

Browse files
Files changed (2) hide show
  1. app.py +13 -0
  2. model.pkl +3 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastai.vision.all import *
2
+ import gradio as gr
3
+
4
+ genres = ('rock, jazz')
5
+ learner = load_learner('model.pkl')
6
+
7
+ def predict_genre(img):
8
+ pred, idx, probs = learner.predict(img)
9
+ return dict(zip(genres, map(float, probs)))
10
+
11
+
12
+ demo = gr.Interface(fn=predict_genre, inputs="image", outputs="label")
13
+ demo.launch()
model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13fcaada4f339f7e502f441f590de9c0bf79beff32f9f54ad701c0e42f38720e
3
+ size 46962347