SANJAYV10 commited on
Commit
530f1fe
1 Parent(s): 32a363f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,9 +1,10 @@
1
  import fastapi
2
  from transformers import pipeline
3
  import h5py
 
4
 
5
- # Load the model from the h5 file
6
- model = h5py.File("model_finetuned.h5", "r")["model"]
7
 
8
  # Define a function to preprocess the image
9
  def preprocess_image(image):
 
1
  import fastapi
2
  from transformers import pipeline
3
  import h5py
4
+ import keras
5
 
6
+ # Load the model from the HDF5 file
7
+ model = keras.models.load_model("model_finetuned.h5")]
8
 
9
  # Define a function to preprocess the image
10
  def preprocess_image(image):