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()