Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| def greet_and_show_cat(name): | |
| # Greeting message | |
| greeting = f"Hello {name}!!" | |
| # URL of a cat image | |
| cat_image_url = "https://placekitten.com/400/400" | |
| # Return both the greeting and the cat image | |
| return greeting, cat_image_url | |
| # Define the Gradio Interface | |
| demo = gr.Interface( | |
| fn=greet_and_show_cat, # Function that returns both greeting and cat image | |
| inputs="text", # Input is a text field for the user to enter their name | |
| outputs=["text", "image"] # Outputs include both text and image | |
| ) | |
| # Launch the interface | |
| demo.launch() | |