hb-setosys commited on
Commit
044b146
·
verified ·
1 Parent(s): c2840e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  def predict(image):
2
  # Convert image to a numpy array
3
  image = np.array(image)
 
1
+ import gradio as gr # Ensure you import gradio correctly
2
+ import tensorflow as tf
3
+ import numpy as np
4
+
5
+ # Load the Keras model
6
+ model = tf.keras.models.load_model("denis_mnist_cnn_model.h5")
7
+
8
+ # Define a function to preprocess input and make predictions
9
  def predict(image):
10
  # Convert image to a numpy array
11
  image = np.array(image)