B2TheOwn commited on
Commit
bd8e918
·
verified ·
1 Parent(s): c2ce401

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def feco_app(name, question):
4
+ if question.strip() == "":
5
+ return f"Hello {name}, please ask something about Finance Education 📘."
6
+ if "course" in question.lower():
7
+ return f"Hi {name}, we offer online finance courses. More details coming soon!"
8
+ elif "contact" in question.lower():
9
+ return f"Hello {name}, you can contact FECO via email: feco@edu.org 📩"
10
+ else:
11
+ return f"Hello {name}, thanks for your interest in '{question}'. Content is being prepared!"
12
+
13
+ with gr.Blocks() as demo:
14
+ gr.Markdown("# 📚 Finance Education College Online (FECO)")
15
+ gr.Markdown("Welcome to our online education platform! 🚀")
16
+
17
+ with gr.Row():
18
+ name = gr.Textbox(label="Your Name")
19
+ question = gr.Textbox(label="Ask a Question")
20
+
21
+ output = gr.Textbox(label="Response")
22
+ submit_btn = gr.Button("Submit")
23
+
24
+ submit_btn.click(feco_app, inputs=[name, question], outputs=output)
25
+
26
+ demo.launch()