Spaces:
Sleeping
Sleeping
Saif Rehman Nasir
commited on
Commit
·
4fe53d8
1
Parent(s):
076f151
Refactor code
Browse files
app.py
CHANGED
@@ -290,8 +290,12 @@ def create_interface():
|
|
290 |
|
291 |
def master_decision(message):
|
292 |
decision_response = ""
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
|
|
295 |
for m in client.chat_completion(
|
296 |
m_message,
|
297 |
stream=True,
|
@@ -304,7 +308,7 @@ def master_decision(message):
|
|
304 |
movie_client = Client("ironserengety/movies-recommender")
|
305 |
result = movie_client.predict(
|
306 |
message=message,
|
307 |
-
system_message="You are a movie recommender named 'Exodia'. You are extremely reliable. You always mention your name in the beginning of conversation. You will provide me with answers from the given info. Give not more than 3 choices and make sure that answers are complete sentences.",
|
308 |
max_tokens=512,
|
309 |
temperature=0.7,
|
310 |
top_p=0.95,
|
|
|
290 |
|
291 |
def master_decision(message):
|
292 |
decision_response = ""
|
293 |
+
judge_system_message = """You are helpful assistant. You will be given queries from the user and you decide on which domain the query belongs to. You have three domains : ["movies","music","others"]. If you don't know about the domain of a query, it is to be classified as "others". Please give a one word answer in smaller caps."""
|
294 |
+
|
295 |
+
m_message = [
|
296 |
+
{"role":"system","content":judge_system_message},
|
297 |
+
{"role": "user", "content": message}
|
298 |
+
]
|
299 |
for m in client.chat_completion(
|
300 |
m_message,
|
301 |
stream=True,
|
|
|
308 |
movie_client = Client("ironserengety/movies-recommender")
|
309 |
result = movie_client.predict(
|
310 |
message=message,
|
311 |
+
system_message="You are a movie recommender named 'Exodia'. You are extremely reliable. You always mention your name in the beginning of conversation. You will provide me with answers from the given info. Give not more than 3 choices and make sure that answers are complete sentences. Give short one-line descriptions of each sentence.",
|
312 |
max_tokens=512,
|
313 |
temperature=0.7,
|
314 |
top_p=0.95,
|