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 chess information.
|
| 64 |
"""
|
| 65 |
try:
|
| 66 |
-
system_message = "You are a
|
| 67 |
user_message = f"Here's the information on chess: {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,20 +97,19 @@ def query_model(question):
|
|
| 97 |
|
| 98 |
# Define the welcome message and specific topics the chatbot can provide information about
|
| 99 |
welcome_message = """
|
| 100 |
-
# 💋 Welcome to
|
| 101 |
|
| 102 |
-
##
|
| 103 |
"""
|
| 104 |
|
| 105 |
topics = """
|
| 106 |
-
###
|
| 107 |
-
-
|
| 108 |
-
-
|
| 109 |
-
-
|
| 110 |
-
-
|
| 111 |
-
-
|
| 112 |
-
-
|
| 113 |
-
- Chess tactics
|
| 114 |
"""
|
| 115 |
|
| 116 |
# Setup the Gradio Blocks interface with custom layout components
|
|
|
|
| 63 |
Generate a response emphasizing the bot's capability in providing chess information.
|
| 64 |
"""
|
| 65 |
try:
|
| 66 |
+
system_message = "You are a celebrity chatbot specialized in providing the names of celebrities based on descriptions of their physical characteristics provided by the user."
|
| 67 |
user_message = f"Here's the information on chess: {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 CelebrityFinder! Give me a list of physical attributes of a celebrity, and I'll give you a name that matches."
|
| 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 |
+
# 💋 Welcome to CelebrityFinder!
|
| 101 |
|
| 102 |
+
## I'm an AI-driven assistant that provides the names of celebrities based on the physical attributes you provide. Created by Matt Getz of the 2024 Kode With Klossy LA Camp.
|
| 103 |
"""
|
| 104 |
|
| 105 |
topics = """
|
| 106 |
+
### Ask about celebrities based on any of the attributes below!
|
| 107 |
+
- Hair color
|
| 108 |
+
- Skin color
|
| 109 |
+
- Height
|
| 110 |
+
- Level of Attractiveness
|
| 111 |
+
- Age
|
| 112 |
+
- Prominent Facial Features
|
|
|
|
| 113 |
"""
|
| 114 |
|
| 115 |
# Setup the Gradio Blocks interface with custom layout components
|