Spaces:
Sleeping
Sleeping
Update chatbot_ui.py
Browse files- chatbot_ui.py +5 -2
chatbot_ui.py
CHANGED
|
@@ -3,9 +3,12 @@ import gradio as gr # For building the chatbot UI
|
|
| 3 |
# Chatbot response function
|
| 4 |
def chatbot_response(user_input):
|
| 5 |
if user_input.lower() in ["hello", "hi"]:
|
| 6 |
-
|
| 7 |
else:
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Gradio interface setup
|
| 11 |
with gr.Blocks() as demo:
|
|
|
|
| 3 |
# Chatbot response function
|
| 4 |
def chatbot_response(user_input):
|
| 5 |
if user_input.lower() in ["hello", "hi"]:
|
| 6 |
+
response = "Hello! How can I help you with your studies today?"
|
| 7 |
else:
|
| 8 |
+
response = "I'm here to assist with academic questions. Feel free to ask about study tips, time management, or anything else!"
|
| 9 |
+
|
| 10 |
+
# Returning the conversation in the correct format (list of tuples)
|
| 11 |
+
return [(user_input, response)]
|
| 12 |
|
| 13 |
# Gradio interface setup
|
| 14 |
with gr.Blocks() as demo:
|