hwberry2 commited on
Commit
4f7405e
·
1 Parent(s): d27ee2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -45,13 +45,12 @@ with gr.Blocks() as demo:
45
  print "Test accuracy: ", test_acc
46
 
47
  # Define any necessary preprocessing steps for the image input here
48
- probability_model = tf.keras.Sequential([model,
49
- tf.keras.layers.Softmax()])
50
  # Make a prediction using the model
51
  prediction = probability_model.predict(img)
52
 
53
  # Postprocess the prediction and return it
54
- return prediction
55
 
56
 
57
  # Creates the Gradio interface objects
 
45
  print "Test accuracy: ", test_acc
46
 
47
  # Define any necessary preprocessing steps for the image input here
48
+ probability_model = tf.keras.Sequential([model, tf.keras.layers.Softmax()])
 
49
  # Make a prediction using the model
50
  prediction = probability_model.predict(img)
51
 
52
  # Postprocess the prediction and return it
53
+ return np.argmax(predictions[0])
54
 
55
 
56
  # Creates the Gradio interface objects