hwajjala commited on
Commit
1a4386f
β€’
1 Parent(s): edc9052

Add logging config

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -8,7 +8,11 @@ from PIL import Image
8
  import gradio as gr
9
  from scipy.special import softmax
10
 
11
-
 
 
 
 
12
  logger = logging.getLogger("basebody")
13
  CLIP_MODEL_NAME = "ViT-B/16"
14
 
@@ -146,6 +150,7 @@ def predict_fn(input_img):
146
  else:
147
  decision = "AUTO ACCEPT"
148
  elif result_probabilty < 0.2:
 
149
  decision = "AUTO REJECT"
150
  elif old_result_probabilty < 0.06:
151
  logger.info("old_result_probabilty < 0.06")
 
8
  import gradio as gr
9
  from scipy.special import softmax
10
 
11
+ # set logging level
12
+ logging.basicConfig(
13
+ level=logging.INFO,
14
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
15
+ )
16
  logger = logging.getLogger("basebody")
17
  CLIP_MODEL_NAME = "ViT-B/16"
18
 
 
150
  else:
151
  decision = "AUTO ACCEPT"
152
  elif result_probabilty < 0.2:
153
+ logger.info("result_probabilty < 0.2")
154
  decision = "AUTO REJECT"
155
  elif old_result_probabilty < 0.06:
156
  logger.info("old_result_probabilty < 0.06")