Spaces:
Runtime error
Runtime error
import cv2 | |
from upcunet_v3 import RealWaifuUpScaler | |
import traceback | |
import gradio as gr | |
def greet(input_img): | |
print(input_img.shape) | |
result = upscaler(input_img, tile_mode=2) | |
print(result.shape) | |
return result | |
if __name__ == '__main__': | |
ModelPath = "weights_v3/" | |
ModelName = "up2x-latest-no-denoise.pth" | |
upscaler = RealWaifuUpScaler(2, ModelPath + ModelName, half=False, device="cpu") | |
inputs = gr.inputs.Image() | |
outputs = "image" | |
iface = gr.Interface(fn=greet, inputs=inputs, outputs=outputs) | |
iface.launch() | |