import gradio as gr def greet(name): import torch return f"Hello {name}, we are using torch {torch.__version__}" iface = gr.Interface(fn=greet, inputs="text", outputs="text") iface.launch()