Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,7 @@ def generate_response(user_query, relevant_segment):
|
|
63 |
Generate a response emphasizing the bot's capability in providing workout ideas.
|
64 |
"""
|
65 |
try:
|
66 |
-
system_message = "You are
|
67 |
user_message = f"Here's my suggestion: {relevant_segment}"
|
68 |
messages = [
|
69 |
{"role": "system", "content": system_message},
|
@@ -88,7 +88,7 @@ def query_model(question):
|
|
88 |
Process a question, find relevant information, and generate a response.
|
89 |
"""
|
90 |
if question == "":
|
91 |
-
return "Welcome to
|
92 |
relevant_segment = find_relevant_segment(question, segments)
|
93 |
if not relevant_segment:
|
94 |
return "Could not find specific information. Please refine your question."
|
@@ -97,18 +97,20 @@ def query_model(question):
|
|
97 |
|
98 |
# Define the welcome message and specific topics the chatbot can provide information about
|
99 |
welcome_message = """
|
100 |
-
#
|
101 |
-
|
102 |
-
## Your AI-driven assistant for workout and exercise suggestions.
|
103 |
"""
|
104 |
|
105 |
topics = """
|
106 |
-
###
|
107 |
-
-
|
108 |
-
-
|
109 |
-
-
|
110 |
-
-
|
111 |
-
-
|
|
|
|
|
|
|
112 |
"""
|
113 |
|
114 |
# Setup the Gradio Blocks interface with custom layout components
|
|
|
63 |
Generate a response emphasizing the bot's capability in providing workout ideas.
|
64 |
"""
|
65 |
try:
|
66 |
+
system_message = "You are a chef chatbot specialized in generating recipes based on user input of ingredients."
|
67 |
user_message = f"Here's my suggestion: {relevant_segment}"
|
68 |
messages = [
|
69 |
{"role": "system", "content": system_message},
|
|
|
88 |
Process a question, find relevant information, and generate a response.
|
89 |
"""
|
90 |
if question == "":
|
91 |
+
return "Welcome to ChefBot! Ask me anything about sustainability, recipes, and cooking in general"
|
92 |
relevant_segment = find_relevant_segment(question, segments)
|
93 |
if not relevant_segment:
|
94 |
return "Could not find specific information. Please refine your question."
|
|
|
97 |
|
98 |
# Define the welcome message and specific topics the chatbot can provide information about
|
99 |
welcome_message = """
|
100 |
+
# 👨🍳 Welcolme to ChefBot, your personal Culinary Companion!
|
101 |
+
## Your AI-driven assistant for queries about sustainable eating, cooking, and living. Created by Archie, Rebecca, and Christine of the 2024 Kode With Klossy NYC AI/ML Camp.
|
|
|
102 |
"""
|
103 |
|
104 |
topics = """
|
105 |
+
### Feel Free to ask me anything from the topics below!
|
106 |
+
- Food Deserts
|
107 |
+
- Sustainble changes to make
|
108 |
+
- Recipes using the following ingredients:
|
109 |
+
- Fresh Veggies: Carrots, onions, spinich, bell peppers, potatoes, avocados
|
110 |
+
- Fresh Fruits: Apples, berries, cherries
|
111 |
+
- Meats: Chicken, beef
|
112 |
+
- Grains: Quinoa, spagetti, bread
|
113 |
+
- Dairy: Cheese, greek yogurt
|
114 |
"""
|
115 |
|
116 |
# Setup the Gradio Blocks interface with custom layout components
|