OmerFarooq commited on
Commit
ab67498
1 Parent(s): 4a989c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -109,14 +109,14 @@ def get_grad(img):
109
  if y_pred[0] > 0.5: pred_class = "cat"
110
  else: pred_class = "dog"
111
 
112
- text = "Raw Score: " + str(y_pred) + "\nClassification: " + pred_class
113
  return grad_img, text
114
 
115
  demo = gr.Interface(
116
  fn = get_grad,
117
  inputs = gr.Image(type = "pil", shape = (224,224)),
118
  # outputs = [gr.outputs.Label(num_top_classes = 2, label = 'Classifiaction'), gr.Textbox('infer_time', label = 'Inference Time(ms)')]
119
- outputs = [gr.Image(type = "numpy"), gr.Textbox(label = 'Prediction (threshold: 0.5)')]
120
  )
121
  demo.launch()
122
 
 
109
  if y_pred[0] > 0.5: pred_class = "cat"
110
  else: pred_class = "dog"
111
 
112
+ text = "Raw Score: " + str(y_pred[0]) + "\nClassification: " + pred_class
113
  return grad_img, text
114
 
115
  demo = gr.Interface(
116
  fn = get_grad,
117
  inputs = gr.Image(type = "pil", shape = (224,224)),
118
  # outputs = [gr.outputs.Label(num_top_classes = 2, label = 'Classifiaction'), gr.Textbox('infer_time', label = 'Inference Time(ms)')]
119
+ outputs = [gr.Image(type = "numpy", width = 160, height = 160), gr.Textbox(label = 'Prediction', info = '(threshold: 0.5)')]
120
  )
121
  demo.launch()
122