import gradio as gr # Function to calculate the square of a number def square_number(number): return number ** 2 # Gradio interface interface = gr.Interface( fn=square_number, # Function to call inputs="number", # Input type (numeric input) outputs="number", # Output type (numeric output) title="Number Squarer", description="Enter a number, and the app will return its square!" ) # Launch the interface interface.launch()