simonVP commited on
Commit
0ab3126
1 Parent(s): 6bfc773

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py DELETED
@@ -1,15 +0,0 @@
1
- from fastai.vision.all import *
2
- import gradio as gr
3
-
4
- def is_player(x): return x[0]
5
- learn = load_learner('model_basketball.pkl')
6
-
7
- def classify_image(img):
8
- pred, idx, probs = learn.predict(img)
9
- return f'{pred} with a probability of {probs[idx]:.04f}'
10
-
11
- image = gr.inputs.Image()
12
- label = gr.outputs.Label()
13
-
14
- intf = gr.Interface(fn = classify_image, inputs = image, outputs = label)
15
- intf.launch(inline = False)