rafaym commited on
Commit
717336b
·
1 Parent(s): 0806aec
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ categories=('white people','black people')
2
+ def func_classi(img):
3
+ pred,idx,probs=learn.predict(img)
4
+ return dict(zip(categories,map(float,probs)))
5
+
6
+ import gradio as gr
7
+ image=gr.inputs.Image(shape=(192,192))
8
+ label=gr.outputs.Label()
9
+ examples=('white people','black people')
10
+ demo = gr.Interface(fn=func_classi, inputs="image", outputs="label")
11
+ demo.launch(inline=False,share=True)