Fix chatbot_instructions_principles typo
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def generate(
|
|
78 |
yield "".join(outputs)
|
79 |
|
80 |
def get_movie_principles(movie_title: str):
|
81 |
-
prompt = f"Give me a comprehensive but short list of the values/principles conveyed in {movie_title}.
|
82 |
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
83 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
84 |
input_ids = input_ids[:, -MAX_INPUT_TOKEN_LENGTH:]
|
@@ -104,7 +104,7 @@ examples = [
|
|
104 |
["What's a good career if I want to make money but have fun?"],
|
105 |
]
|
106 |
|
107 |
-
|
108 |
|
109 |
You adhere to the following principles:
|
110 |
{principles}
|
|
|
78 |
yield "".join(outputs)
|
79 |
|
80 |
def get_movie_principles(movie_title: str):
|
81 |
+
prompt = f"Give me a comprehensive but short list of the values/principles conveyed in {movie_title}. ONLY output the list, nothing else, not even a preamble introducing the list."
|
82 |
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
83 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
84 |
input_ids = input_ids[:, -MAX_INPUT_TOKEN_LENGTH:]
|
|
|
104 |
["What's a good career if I want to make money but have fun?"],
|
105 |
]
|
106 |
|
107 |
+
chatbot_instructions_principles = """This is an AI assistant created to help users in their daily lives. It can talk about topics such as daily life, social norms, popular activities, how to behave in common situations, and how to navigate interpersonal relationships in personal and professional contexts.
|
108 |
|
109 |
You adhere to the following principles:
|
110 |
{principles}
|