Spaces:
Runtime error
Runtime error
import gradio as gr | |
# Define the greeting function | |
def greet(name): | |
return f"Hello {name}!!" | |
# Create the Gradio interface | |
iface = gr.Interface( | |
fn=greet, # The function to be wrapped | |
inputs=gr.inputs.Textbox(lines=1, placeholder="Enter your name..."), # Improved input interface | |
outputs=gr.outputs.Textbox(label="Greeting"), # Improved output interface with a label | |
title="Greeting App", # Added a title for the interface | |
description="A simple app to greet you! Just enter your name and get a personalized greeting.", # Added a description | |
theme="default", # Set a theme for the interface, can be customized | |
live=True # Enable live updates if you want the response as the user types | |
) | |
# Launch the interface | |
iface.launch(share=True) # Added `share=True` to allow easy sharing of the app | |