import gradio as gr # Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codeparrot/codeparrot") demo = gr.ChatInterface(pipe, examples=["lion.jpg", "logo.png"], ) demo.launch() from skimage.color import rgb2gray def as_gray(image): return rgb2gray(image) # Same syntax as requirements.txt scikit-image