Sa-m commited on
Commit
b2df551
1 Parent(s): b6c8702

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -68,7 +68,7 @@ def gray_scaled(inp_img):
68
 
69
  def transform_mymodel(content_image,style_image):
70
  # Convert to float32 numpy array, add batch dimension, and normalize to range [0, 1]
71
- #content_image=gray_scaled(content_image)
72
  content_image = content_image.astype(np.float32)[np.newaxis, ...] / 255.0
73
  style_image = style_image.astype(np.float32)[np.newaxis, ...] / 255.0
74
 
@@ -81,7 +81,6 @@ def transform_mymodel(content_image,style_image):
81
 
82
  # stylized = tf.image.resize(stylized_image, (356, 356))
83
  stylized_image =tensor_to_image(stylized_image)
84
- save_image(stylized_image,'stylized')
85
  return stylized_image
86
 
87
  def gradio_intrface(mymodel):
 
68
 
69
  def transform_mymodel(content_image,style_image):
70
  # Convert to float32 numpy array, add batch dimension, and normalize to range [0, 1]
71
+ content_image=gray_scaled(content_image)
72
  content_image = content_image.astype(np.float32)[np.newaxis, ...] / 255.0
73
  style_image = style_image.astype(np.float32)[np.newaxis, ...] / 255.0
74
 
 
81
 
82
  # stylized = tf.image.resize(stylized_image, (356, 356))
83
  stylized_image =tensor_to_image(stylized_image)
 
84
  return stylized_image
85
 
86
  def gradio_intrface(mymodel):