nahidalam commited on
Commit
853b236
·
1 Parent(s): b2558f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -28,6 +28,7 @@ def predict_and_save(img, generator_model):
28
 
29
  def run(image_path):
30
  model = tf.keras.models.load_model('pretrained')
 
31
  '''
32
  img = tf.keras.preprocessing.image.load_img(
33
  image_path, target_size=(256, 256)
@@ -39,6 +40,7 @@ def run(image_path):
39
  #predict_and_save(img_array, model)
40
  img_array = tf.expand_dims(image_path, 0)
41
  im = predict_and_save(img_array, model)
 
42
  return im
43
 
44
  iface = gr.Interface(run, gr.inputs.Image(shape=(256, 256)), "image")
 
28
 
29
  def run(image_path):
30
  model = tf.keras.models.load_model('pretrained')
31
+ print("Model loaded")
32
  '''
33
  img = tf.keras.preprocessing.image.load_img(
34
  image_path, target_size=(256, 256)
 
40
  #predict_and_save(img_array, model)
41
  img_array = tf.expand_dims(image_path, 0)
42
  im = predict_and_save(img_array, model)
43
+ print("Prediction Done")
44
  return im
45
 
46
  iface = gr.Interface(run, gr.inputs.Image(shape=(256, 256)), "image")