bencoman commited on
Commit
d12c3b5
1 Parent(s): 5920c64

adding debug code

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,10 +1,12 @@
1
  from fastai.vision.all import *
2
  import gradio as gr
 
3
 
4
  learn = load_learner('watersports.pkl')
5
  categories = learn.dls.vocab
6
 
7
  def classify_image(img):
 
8
  print('Classifying ')
9
  pred,idx,probs = learn.predict(img)
10
  return( dict(zip(categories, map(float,probs))))
 
1
  from fastai.vision.all import *
2
  import gradio as gr
3
+ import logging
4
 
5
  learn = load_learner('watersports.pkl')
6
  categories = learn.dls.vocab
7
 
8
  def classify_image(img):
9
+ logging.warning('Watch out!') # will print a message to the console
10
  print('Classifying ')
11
  pred,idx,probs = learn.predict(img)
12
  return( dict(zip(categories, map(float,probs))))