Spaces:
Runtime error
Runtime error
leandrocarneiro
commited on
Upload rag.py
Browse files
rag.py
CHANGED
@@ -90,13 +90,14 @@ class Rag:
|
|
90 |
)
|
91 |
else:
|
92 |
prompt_template = """Your task is to create news for a newspaper based on pieces of text delimited by <> and a question delimited by <>.
|
|
|
93 |
Do not use only your knowledge to make the news. Make the news based on the question, but using the pieces of text.
|
94 |
If the pieces of text don't enough information about the question to create the news, just say that you need more sources of information, nothing more.
|
95 |
The news should have a title.
|
96 |
The news should be written in a formal language.
|
97 |
The source of the news should not be in the news, just the text.
|
98 |
The news should have between {min_words} and {max_words} words.
|
99 |
-
|
100 |
The news should be about the following context: <{context}>
|
101 |
Question: <{question}>
|
102 |
Answer here:"""
|
|
|
90 |
)
|
91 |
else:
|
92 |
prompt_template = """Your task is to create news for a newspaper based on pieces of text delimited by <> and a question delimited by <>.
|
93 |
+
The news should be written in Portuguese language.
|
94 |
Do not use only your knowledge to make the news. Make the news based on the question, but using the pieces of text.
|
95 |
If the pieces of text don't enough information about the question to create the news, just say that you need more sources of information, nothing more.
|
96 |
The news should have a title.
|
97 |
The news should be written in a formal language.
|
98 |
The source of the news should not be in the news, just the text.
|
99 |
The news should have between {min_words} and {max_words} words.
|
100 |
+
After write the news, confirm if it is written in Portuguese language.
|
101 |
The news should be about the following context: <{context}>
|
102 |
Question: <{question}>
|
103 |
Answer here:"""
|