AustinL commited on
Commit
57f9ae0
·
verified ·
1 Parent(s): ff86068

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -20,6 +20,10 @@ for dirname, _, filenames in os.walk('/kaggle/input'):
20
 
21
  import gradio as gr
22
 
 
 
 
 
23
  # Assuming no shape needs to be specified directly in the constructor
24
  image = gr.Image()
25
  label = gr.Label()
 
20
 
21
  import gradio as gr
22
 
23
+ def classify_image(img):
24
+ pred,idx,probs = learn.predict(img)
25
+ return dict(zip(categories, map(float,probs)))
26
+
27
  # Assuming no shape needs to be specified directly in the constructor
28
  image = gr.Image()
29
  label = gr.Label()