hb-setosys commited on
Commit
fabe0a3
·
verified ·
1 Parent(s): 90c9e9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -32,7 +32,8 @@ def predict(image):
32
  prediction = model.predict(image) # Predict
33
  predicted_class = np.argmax(prediction, axis=-1)[0] # Get the predicted class
34
  class_confidence = np.max(prediction, axis=-1)[0] # Get the confidence score
35
- return {"prediction": int(predicted_class), "confidence": class_confidence}
 
36
 
37
  # Create a Gradio interface
38
  interface = gr.Interface(fn=predict, inputs="image", outputs="json")
 
32
  prediction = model.predict(image) # Predict
33
  predicted_class = np.argmax(prediction, axis=-1)[0] # Get the predicted class
34
  class_confidence = np.max(prediction, axis=-1)[0] # Get the confidence score
35
+ #return {"prediction": int(predicted_class), "confidence": class_confidence}
36
+ return {"prediction": int(predicted_class)}
37
 
38
  # Create a Gradio interface
39
  interface = gr.Interface(fn=predict, inputs="image", outputs="json")