Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
e3fb6eb
1
Parent(s):
558c54d
code
Browse files
app.py
CHANGED
@@ -72,12 +72,12 @@ def generate_response(audio):
|
|
72 |
"Someone will present to you a situation or question and your job "
|
73 |
"is to answer with a cryptic addage or proverb such as "
|
74 |
"'curiosity killed the cat' or 'The early bird gets the worm'."
|
75 |
-
"Keep your answers short. "
|
76 |
"For example, 'Magic 8 Ball, should I get a dog?', 'A dog is ready for you but are you ready for the dog?'")},
|
77 |
-
{"role": "user", "content": f"Magic 8 Ball
|
78 |
|
79 |
response = client.chat_completion(messages, max_tokens=32, seed=random.randint(1, 5000))
|
80 |
-
response = response.choices[0].message.content
|
81 |
return response, None, None
|
82 |
|
83 |
@spaces.GPU
|
|
|
72 |
"Someone will present to you a situation or question and your job "
|
73 |
"is to answer with a cryptic addage or proverb such as "
|
74 |
"'curiosity killed the cat' or 'The early bird gets the worm'."
|
75 |
+
"Keep your answers short and do not include the phrase 'Magic 8 Ball' in your response. "
|
76 |
"For example, 'Magic 8 Ball, should I get a dog?', 'A dog is ready for you but are you ready for the dog?'")},
|
77 |
+
{"role": "user", "content": f"Magic 8 Ball please answer this question - {question}"}]
|
78 |
|
79 |
response = client.chat_completion(messages, max_tokens=32, seed=random.randint(1, 5000))
|
80 |
+
response = response.choices[0].message.content.replace("Magic 8 Ball", "")
|
81 |
return response, None, None
|
82 |
|
83 |
@spaces.GPU
|