Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
#
|
| 4 |
def chatbot_response(user_input):
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Gradio interface setup
|
| 8 |
with gr.Blocks() as demo:
|
|
@@ -16,3 +21,4 @@ with gr.Blocks() as demo:
|
|
| 16 |
# Launch Gradio
|
| 17 |
demo.launch()
|
| 18 |
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
# Enhanced chatbot response function
|
| 4 |
def chatbot_response(user_input):
|
| 5 |
+
if 'time management' in user_input.lower():
|
| 6 |
+
return "Time management is important! Here are a few tips: 1. Prioritize tasks. 2. Set deadlines. 3. Break tasks into smaller parts."
|
| 7 |
+
elif 'science' in user_input.lower():
|
| 8 |
+
return "Science is fascinating! What specific topic are you interested in? Physics, Chemistry, Biology?"
|
| 9 |
+
else:
|
| 10 |
+
return f"You said: {user_input}"
|
| 11 |
|
| 12 |
# Gradio interface setup
|
| 13 |
with gr.Blocks() as demo:
|
|
|
|
| 21 |
# Launch Gradio
|
| 22 |
demo.launch()
|
| 23 |
|
| 24 |
+
|