import gradio as gr from transformers_js_py import pipeline pipe = await pipeline('image-to-image', 'Xenova/swin2SR-classical-sr-x2-64') demo = gr.Interface.from_pipeline(pipe) demo.launch() from skimage.color import rgb2gray def as_gray(image): return rgb2gray(image) # Same syntax as requirements.txt transformers-js-py