GabrielML commited on
Commit
159fcff
·
1 Parent(s): 1d338b0

Update app

Browse files
Files changed (1) hide show
  1. src/app.py +3 -0
src/app.py CHANGED
@@ -25,10 +25,12 @@ def load_model(model_name):
25
 
26
  def predict(inp):
27
  global current_model
 
28
  if current_model is None:
29
  raise gr.Error("No model loaded!")
30
 
31
  confidences = inference(current_model, inp)
 
32
  return confidences
33
 
34
  with gr.Blocks() as demo:
@@ -61,6 +63,7 @@ with gr.Blocks() as demo:
61
  scale=1,
62
  )
63
  model_dropdown.change(load_model, model_dropdown, show_progress=True, queue=True)
 
64
  predict_button = gr.Button(label="Predict", info="Click to make a prediction.", scale=1)
65
  predict_button.click(fn=predict, inputs=user_image, outputs=output, queue=True)
66
 
 
25
 
26
  def predict(inp):
27
  global current_model
28
+ print(f"\nPredicting with {current_model}\n")
29
  if current_model is None:
30
  raise gr.Error("No model loaded!")
31
 
32
  confidences = inference(current_model, inp)
33
+ print(f"\nConfidences: {confidences}\n")
34
  return confidences
35
 
36
  with gr.Blocks() as demo:
 
63
  scale=1,
64
  )
65
  model_dropdown.change(load_model, model_dropdown, show_progress=True, queue=True)
66
+
67
  predict_button = gr.Button(label="Predict", info="Click to make a prediction.", scale=1)
68
  predict_button.click(fn=predict, inputs=user_image, outputs=output, queue=True)
69