import gradio as gr from tformers import tformers_function # make sure tformers.py is in the same directory or in the Python path # Create a Gradio Interface for the tformers function tformers_iface = gr.Interface(fn=tformers_function, inputs="image", outputs="text") # Launch the interface tformers_iface.launch()