import gradio as gr
from transformers_js_py import pipeline
pipe = await pipeline('image-classification', 'Xenova/vit-base-patch16-224')
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