Update prompt
Browse files- t5_summary.py +6 -2
t5_summary.py
CHANGED
@@ -11,13 +11,17 @@ llm = HuggingFaceHub(
|
|
11 |
# print(llm)
|
12 |
|
13 |
template = '''
|
14 |
-
You are a helpful assistant who can
|
|
|
|
|
15 |
Consider the following poem:
|
16 |
|
17 |
{poem}
|
18 |
|
|
|
19 |
Write a creative summary of the poem in about 20 words.
|
20 |
-
The summary should try to capture the
|
|
|
21 |
'''
|
22 |
|
23 |
prompt = PromptTemplate.from_template(template)
|
|
|
11 |
# print(llm)
|
12 |
|
13 |
template = '''
|
14 |
+
You are a helpful assistant who can review literature and poetry.
|
15 |
+
A poem consists of one or more stanzas. A stanza may contain as few as a single line.
|
16 |
+
Consecutive stanzas are separated by blank lines. Generally, the stanzas stand out differently.
|
17 |
Consider the following poem:
|
18 |
|
19 |
{poem}
|
20 |
|
21 |
+
|
22 |
Write a creative summary of the poem in about 20 words.
|
23 |
+
The summary should try to capture the subjects, objects, key themes, and sentiments.
|
24 |
+
The summary should avoid verbatim use of lines from the poem.
|
25 |
'''
|
26 |
|
27 |
prompt = PromptTemplate.from_template(template)
|