Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def autocontrast(tensor, cutoff=0):
|
|
16 |
return adjusted_tensor
|
17 |
|
18 |
def read_image(image):
|
19 |
-
tf.io.decode_image(image,channels=3)
|
20 |
image = autocontrast(image)
|
21 |
image.set_shape([None, None, 3])
|
22 |
image = tf.cast(image, dtype=tf.float32) / 255
|
@@ -32,7 +32,7 @@ def enhance_image(input_image):
|
|
32 |
# Process the input image using the loaded model
|
33 |
image = read_image(input_image)
|
34 |
image = np.expand_dims(image, axis=0)
|
35 |
-
output_image = model.predict(
|
36 |
generated_image = np.squeeze(output_image, axis=0)
|
37 |
generated_image = tf.keras.preprocessing.image.array_to_img(generated_image)
|
38 |
# Return the output image
|
|
|
16 |
return adjusted_tensor
|
17 |
|
18 |
def read_image(image):
|
19 |
+
image = tf.io.decode_image(image,channels=3)
|
20 |
image = autocontrast(image)
|
21 |
image.set_shape([None, None, 3])
|
22 |
image = tf.cast(image, dtype=tf.float32) / 255
|
|
|
32 |
# Process the input image using the loaded model
|
33 |
image = read_image(input_image)
|
34 |
image = np.expand_dims(image, axis=0)
|
35 |
+
output_image = model.predict(image)
|
36 |
generated_image = np.squeeze(output_image, axis=0)
|
37 |
generated_image = tf.keras.preprocessing.image.array_to_img(generated_image)
|
38 |
# Return the output image
|