GameHasNoGame commited on
Commit
4464278
·
verified ·
1 Parent(s): 78237a7

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +16 -0
  2. export.pkl +3 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+
4
+ learn = load_learner('export.pkl')
5
+
6
+ def predict_image(img):
7
+ prediction, _, _ = learn.predict(img)
8
+ return prediction
9
+
10
+
11
+ # UI huggface
12
+
13
+ image = gr.inputs.Image(shape=(192, 192))
14
+ label = gr.outputs.Label()
15
+ intrfce = gr.Interface(fn=predict_image, inputs=image, outputs=label)
16
+ intrfce.launch(inline=False)
export.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67e42436ad581aa74e39f6112a4c5dd0a15ec853f9ec0b98f47b357b8575288f
3
+ size 46972222