Spaces:
Sleeping
Sleeping
File size: 604 Bytes
cc4d260 774e821 cc4d260 774e821 cc4d260 774e821 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
from PIL import Image
import numpy as np
import cv2
def upscale(image):
img = np.array(image)
height, width = img.shape[:2]
upscaled = cv2.resize(img, (width * 4, height * 4), interpolation=cv2.INTER_CUBIC)
return Image.fromarray(upscaled)
demo = gr.Interface(fn=upscale,
inputs=gr.Image(type="pil"),
outputs=gr.Image(type="pil"),
title="HD Image Upscaler (Lite Version)",
description="Upscale gambar 4x pakai resize biasa. Ringan, no watermark, cocok buat HP kentang.")
demo.launch()
|