Spaces:
Sleeping
Sleeping
Download app.py from mirae-dev/our-first-demo: direct link, hf CLI and curl.
- Browser
- Download file 454 Bytes
-
https://huggingface.co/spaces/mirae-dev/our-first-demo/resolve/main/app.py
- Command line
-
hf download hf://spaces/mirae-dev/our-first-demo/app.py
-
curl -L -o app.py https://huggingface.co/spaces/mirae-dev/our-first-demo/resolve/main/app.py
454 Bytes
| import gradio as gr | |
| def show_image(): | |
| return "welcome.jpg" # This file must be in the same folder as app.py | |
| with gr.Blocks(title="Push Me Demo") as demo: | |
| gr.Markdown("# Click the button to reveal an image - you know you want to!") | |
| btn = gr.Button("Push me") | |
| img = gr.Image(label="Your Guide Appears", type="filepath", visible=True) | |
| btn.click(fn=show_image, outputs=img) | |
| if __name__ == "__main__": | |
| demo.launch(share=True) | |