harpreetsahota
commited on
Commit
•
d4aa148
1
Parent(s):
1fb44f8
Update README.md
Browse files
README.md
CHANGED
@@ -76,7 +76,20 @@ deci_generator = pipeline("text-generation",
|
|
76 |
)
|
77 |
|
78 |
prompt = "How do I make the most delicious pancakes the world has ever tasted?"
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
print(response)
|
81 |
```
|
82 |
|
|
|
76 |
)
|
77 |
|
78 |
prompt = "How do I make the most delicious pancakes the world has ever tasted?"
|
79 |
+
|
80 |
+
SYSTEM_PROMPT_TEMPLATE ="""
|
81 |
+
### System:
|
82 |
+
You are an AI assistant that follows instruction extremely well. Help as much as you can.
|
83 |
+
### User:
|
84 |
+
{instruction}
|
85 |
+
### Assistant:
|
86 |
+
"""
|
87 |
+
|
88 |
+
# Function to construct the prompt using the new system prompt template
|
89 |
+
def get_prompt_with_template(message: str) -> str:
|
90 |
+
return SYSTEM_PROMPT_TEMPLATE.format(instruction=message)
|
91 |
+
|
92 |
+
response = deci_generator(get_prompt_with_template(prompt))[0]['generated_text']
|
93 |
print(response)
|
94 |
```
|
95 |
|