franckew commited on
Commit
6c08c1f
1 Parent(s): 37b910f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,11 +2,11 @@ import gradio as gr
2
  from PIL import Image
3
  import numpy as np
4
  from tensorflow.keras.preprocessing import image as keras_image
5
- from tensorflow.keras.applications.xception import preprocess_input
6
  from tensorflow.keras.models import load_model
7
 
8
  # Load your trained model
9
- model = load_model('/home/user/app/xception_model.h5') # Ensure this path is correct
10
 
11
  def predict_character(img):
12
  img = Image.fromarray(img.astype('uint8'), 'RGB') # Ensure the image is in RGB format
 
2
  from PIL import Image
3
  import numpy as np
4
  from tensorflow.keras.preprocessing import image as keras_image
5
+ from tensorflow.keras.applications.resnet50 import preprocess_input
6
  from tensorflow.keras.models import load_model
7
 
8
  # Load your trained model
9
+ model = load_model('/home/user/app/resnet50.h5') # Ensure this path is correct
10
 
11
  def predict_character(img):
12
  img = Image.fromarray(img.astype('uint8'), 'RGB') # Ensure the image is in RGB format