Spaces:
Build error
Build error
Download app.py from PythonEasy/EasyPython: direct link, hf CLI and curl.
- Browser
- Download file 758 Bytes
-
https://huggingface.co/spaces/PythonEasy/EasyPython/resolve/ece9f19a1829a39c848112c5a27f73ae7b99e89e/app.py
- Command line
-
hf download hf://spaces/PythonEasy/EasyPython@ece9f19a1829a39c848112c5a27f73ae7b99e89e/app.py
-
curl -L -o app.py https://huggingface.co/spaces/PythonEasy/EasyPython/resolve/ece9f19a1829a39c848112c5a27f73ae7b99e89e/app.py
758 Bytes
| import gradio as gr | |
| def level_response(choice): | |
| if choice == "Basic": | |
| return "You chose Basic level. Let's start with the fundamentals!" | |
| elif choice == "Intermediate": | |
| return "You chose Intermediate level. Time to go deeper!" | |
| elif choice == "Advanced": | |
| return "You chose Advanced level. You're ready for expert challenges!" | |
| else: | |
| return "Please select a valid option." | |
| with gr.Blocks() as demo: | |
| gr.Markdown("## Choose Your Learning Level") | |
| level = gr.Radio(choices=["Basic", "Intermediate", "Advanced"], label="Select your level") | |
| output = gr.Textbox(label="Response") | |
| submit_btn = gr.Button("Submit") | |
| submit_btn.click(fn=level_response, inputs=level, outputs=output) | |
| demo.launch() | |