Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ faq_responses = {
|
|
| 15 |
|
| 16 |
|
| 17 |
# Define the chatbot's response function
|
| 18 |
-
def faq_chatbot(user_input):
|
| 19 |
# Check if the user's input matches any FAQ keywords
|
| 20 |
for key, response in faq_responses.items():
|
| 21 |
if key in user_input.lower():
|
|
@@ -28,11 +28,12 @@ def faq_chatbot(user_input): # Removed "The Academic Advisor" argument
|
|
| 28 |
|
| 29 |
# Create the Gradio interface
|
| 30 |
interface = gr.Interface(
|
| 31 |
-
fn=faq_chatbot,
|
| 32 |
-
inputs=gr.Textbox(lines=2, placeholder="Ask me about studying tips or resources..."),
|
| 33 |
-
outputs="text",
|
| 34 |
-
title="
|
| 35 |
-
description="Ask me for study tips, time management advice, or about resources to help with your studies!"
|
|
|
|
| 36 |
)
|
| 37 |
|
| 38 |
# Launch the chatbot
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
# Define the chatbot's response function
|
| 18 |
+
def faq_chatbot(user_input):
|
| 19 |
# Check if the user's input matches any FAQ keywords
|
| 20 |
for key, response in faq_responses.items():
|
| 21 |
if key in user_input.lower():
|
|
|
|
| 28 |
|
| 29 |
# Create the Gradio interface
|
| 30 |
interface = gr.Interface(
|
| 31 |
+
fn=faq_chatbot,
|
| 32 |
+
inputs=gr.Textbox(lines=2, placeholder="Ask me about studying tips or resources..."),
|
| 33 |
+
outputs="text",
|
| 34 |
+
title="Academic Advisor",
|
| 35 |
+
description="Ask me for study tips, time management advice, or about resources to help with your studies!",
|
| 36 |
+
inputs_label="**Academic Advisor**", # Change the label to "Academic Advisor"
|
| 37 |
)
|
| 38 |
|
| 39 |
# Launch the chatbot
|