Spaces:
Sleeping
Sleeping
KleinPenny
commited on
Commit
•
69b8c0f
1
Parent(s):
dbd4343
Update app.py
Browse filesmodified the classification prompt
app.py
CHANGED
@@ -98,7 +98,8 @@ def respond(
|
|
98 |
global responded_answer
|
99 |
# Main Decision Module
|
100 |
decision_response = ""
|
101 |
-
judge_main_message = f"Here is a query: '{message}', Determine if this query is asking about one of the topics included in the list below. If it is, please directly provide only one name of the topic;
|
|
|
102 |
m_message = [{"role": "user", "content": judge_main_message}]
|
103 |
for m in client.chat_completion(
|
104 |
m_message,
|
@@ -123,7 +124,7 @@ def respond(
|
|
123 |
responded_answer = result
|
124 |
return result
|
125 |
|
126 |
-
elif "sing" in decision_response.lower():
|
127 |
llama_responded = 1
|
128 |
responded_answer = "SING " + message
|
129 |
return "Here is the song you might like!"
|
@@ -156,6 +157,7 @@ def respond(
|
|
156 |
responded_answer = response
|
157 |
return response
|
158 |
|
|
|
159 |
def update_response_display():
|
160 |
while not llama_responded:
|
161 |
time.sleep(1)
|
|
|
98 |
global responded_answer
|
99 |
# Main Decision Module
|
100 |
decision_response = ""
|
101 |
+
judge_main_message = f"Here is a query: '{message}', Determine if this query is asking about one of the topics included in the list below. If it is, please directly provide only one name of the topic; Otherwise for any other queries, you just reply 'no'. The list of topics is: [movie, music, singing songs]"
|
102 |
+
print(message)
|
103 |
m_message = [{"role": "user", "content": judge_main_message}]
|
104 |
for m in client.chat_completion(
|
105 |
m_message,
|
|
|
124 |
responded_answer = result
|
125 |
return result
|
126 |
|
127 |
+
elif "sing" in decision_response.lower() or "sing" in message.lower():
|
128 |
llama_responded = 1
|
129 |
responded_answer = "SING " + message
|
130 |
return "Here is the song you might like!"
|
|
|
157 |
responded_answer = response
|
158 |
return response
|
159 |
|
160 |
+
|
161 |
def update_response_display():
|
162 |
while not llama_responded:
|
163 |
time.sleep(1)
|