Spaces:
Sleeping
Sleeping
Download app.py from ENLYAS/deploy-checker: direct link, hf CLI and curl.
- Browser
- Download file 843 Bytes
-
https://huggingface.co/spaces/ENLYAS/deploy-checker/resolve/main/app.py
- Command line
-
hf download hf://spaces/ENLYAS/deploy-checker/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ENLYAS/deploy-checker/resolve/main/app.py
843 Bytes
| import gradio as gr | |
| import sys | |
| import platform | |
| def get_system_info(): | |
| return f"Python: {sys.version}\nPlatform: {platform.system()} {platform.release()}" | |
| def greet(name): | |
| return f"Hello, {name}! Deployment test successful." | |
| with gr.Blocks(title="Deployment Checker") as demo: | |
| gr.Markdown("# Can you deploy it?") | |
| gr.Markdown("This app verifies Gradio deployment capabilities.") | |
| with gr.Row(): | |
| with gr.Column(): | |
| name_input = gr.Textbox(label="Enter your name") | |
| greet_btn = gr.Button("Greet") | |
| output_text = gr.Textbox(label="Response") | |
| with gr.Column(): | |
| sys_info = gr.Textbox(label="System Info", value=get_system_info(), interactive=False) | |
| greet_btn.click(fn=greet, inputs=name_input, outputs=output_text) | |
| if __name__ == "__main__": | |
| demo.launch() | |