Spaces:
Sleeping
Sleeping
improving the image quality and sharpness
Browse files
app.py
CHANGED
|
@@ -55,6 +55,10 @@ def process_image(input_image, output_resolution=(512, 512)):
|
|
| 55 |
output_array = (output_image.numpy() * 255).astype(np.uint8)
|
| 56 |
output_pil = Image.fromarray(output_array)
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
return output_pil
|
| 59 |
|
| 60 |
# Create Gradio interface
|
|
|
|
| 55 |
output_array = (output_image.numpy() * 255).astype(np.uint8)
|
| 56 |
output_pil = Image.fromarray(output_array)
|
| 57 |
|
| 58 |
+
|
| 59 |
+
enhancer = ImageEnhance.Sharpness(output_pil)
|
| 60 |
+
output_pil = enhancer.enhance(4) # Adjust the factor as needed
|
| 61 |
+
|
| 62 |
return output_pil
|
| 63 |
|
| 64 |
# Create Gradio interface
|