Redhotchilipoppy
commited on
Commit
•
02be56f
1
Parent(s):
247bf63
Bucket is A B C
Browse files
app.py
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|