Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,9 @@ def enhance_quality(image_path):
|
|
13 |
model.load_weights('RealESRGAN_x4.pth', download=True)
|
14 |
img = Image.open(image_path)
|
15 |
sr_image = model.predict(img)
|
16 |
-
|
17 |
-
|
|
|
18 |
|
19 |
def denoise_image(image_path):
|
20 |
image = cv2.imread(image_path)
|
|
|
13 |
model.load_weights('RealESRGAN_x4.pth', download=True)
|
14 |
img = Image.open(image_path)
|
15 |
sr_image = model.predict(img)
|
16 |
+
enhanced_path = 'enhanced_' + image_path
|
17 |
+
sr_image.save(enhanced_path)
|
18 |
+
return enhanced_path
|
19 |
|
20 |
def denoise_image(image_path):
|
21 |
image = cv2.imread(image_path)
|