Redhotchilipoppy commited on
Commit
02be56f
1 Parent(s): 247bf63

Bucket is A B C

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -1,7 +1,15 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
 
 
 
7
  iface.launch()
 
1
  import gradio as gr
2
 
3
+ image = gr.Image(type='pil')
4
+ label = gr.Label()
5
 
6
+ categories = ('A','B','C')
7
+ probs = [0.3,0.3,0.3]
8
+
9
+ def classify_image(img):
10
+ # pred,idx,probs = learn.predict(img)
11
+ return dict(zip(categories,map(float,probs)))
12
+
13
+
14
+ iface = gr.Interface(fn=classify_image, inputs=image, outputs=label)
15
  iface.launch()