Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def show_cat():
|
| 4 |
+
# URL of a cat image
|
| 5 |
+
cat_image_url = "https://placekitten.com/400/400"
|
| 6 |
+
return cat_image_url
|
| 7 |
+
|
| 8 |
+
# Define the Gradio Interface
|
| 9 |
+
demo = gr.Interface(
|
| 10 |
+
fn=show_cat, # Function to display the cat image
|
| 11 |
+
inputs=[], # No inputs for this function
|
| 12 |
+
outputs="image" # Output will be an image
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
# Launch the interface
|
| 16 |
+
demo.launch()
|