import gradio as gr from utils import translate x = lambda text : translate(x) iface = gr.Interface(fn=x, inputs="text", outputs="text") iface.launch()