MissieMcCown commited on
Commit
b760005
·
verified ·
1 Parent(s): 2ab4929

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -1
app.py CHANGED
@@ -7,7 +7,27 @@ def chatbot_response(user_input):
7
 
8
  # Add more conditions for different queries here
9
  elif "supervised learning" in user_input.lower():
10
- return "Supervised learning is a machine learning approach
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
 
13
 
 
7
 
8
  # Add more conditions for different queries here
9
  elif "supervised learning" in user_input.lower():
10
+ return "Supervised learning is a machine learning approach where models are trained using labeled data."
11
+
12
+ # If no predefined match, ask for more clarification
13
+ else:
14
+ return "I'm here to assist with academic questions. Please specify what you'd like help with."
15
+
16
+ with gr.Blocks() as demo:
17
+ gr.Markdown("### Study Assistance Chatbot")
18
+ gr.Markdown("Welcome! Ask me anything related to your academic studies.")
19
+
20
+ with gr.Row():
21
+ with gr.Column():
22
+ user_input = gr.Textbox(label="Enter your question here:")
23
+ submit_button = gr.Button("Submit")
24
+
25
+ with gr.Column():
26
+ chatbot_output = gr.Textbox(label="Chatbot Response", interactive=False)
27
+
28
+ submit_button.click(chatbot_response, inputs=user_input, outputs=chatbot_output)
29
+
30
+ demo.launch()
31
 
32
 
33