keerthuAi commited on
Commit
8e6f243
·
verified ·
1 Parent(s): e1bb7ae

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def level_response(choice):
4
+ if choice == "Basic":
5
+ return "You chose Basic level. Let's start with the fundamentals!"
6
+ elif choice == "Intermediate":
7
+ return "You chose Intermediate level. Time to go deeper!"
8
+ elif choice == "Advanced":
9
+ return "You chose Advanced level. You're ready for expert challenges!"
10
+ else:
11
+ return "Please select a valid option."
12
+
13
+ with gr.Blocks() as demo:
14
+ gr.Markdown("## Choose Your Learning Level")
15
+ level = gr.Radio(choices=["Basic", "Intermediate", "Advanced"], label="Select your level")
16
+ output = gr.Textbox(label="Response")
17
+ submit_btn = gr.Button("Submit")
18
+
19
+ submit_btn.click(fn=level_response, inputs=level, outputs=output)
20
+
21
+ demo.launch()