Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,6 @@ def autocontrast(tensor, cutoff=0):
|
|
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
|
@@ -30,7 +29,7 @@ model.load_weights("./model.h5")
|
|
30 |
|
31 |
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(image)
|
36 |
generated_image = np.squeeze(output_image, axis=0)
|
|
|
16 |
return adjusted_tensor
|
17 |
|
18 |
def read_image(image):
|
|
|
19 |
image = autocontrast(image)
|
20 |
image.set_shape([None, None, 3])
|
21 |
image = tf.cast(image, dtype=tf.float32) / 255
|
|
|
29 |
|
30 |
def enhance_image(input_image):
|
31 |
# Process the input image using the loaded model
|
32 |
+
image = read_image(input_image)
|
33 |
image = np.expand_dims(image, axis=0)
|
34 |
output_image = model.predict(image)
|
35 |
generated_image = np.squeeze(output_image, axis=0)
|