Spaces:
Runtime error
Runtime error
leandrocarneiro
commited on
Upload rag.py
Browse files
rag.py
CHANGED
@@ -95,12 +95,16 @@ class Rag:
|
|
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
|
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:
|
|
|
|
|
104 |
self.prompt = PromptTemplate(template=prompt_template,
|
105 |
input_variables=["context", "question"],
|
106 |
partial_variables={"min_words": min_words, "max_words": max_words})
|
|
|
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 written in the pieces of text should not be shown in the news.
|
99 |
The news should have between {min_words} and {max_words} words.
|
100 |
+
The total of words should no be shown in the news.
|
101 |
After write the news, confirm if it is written in Portuguese language.
|
102 |
+
Answer the title and the news, nothing more.
|
103 |
The news should be about the following context: <{context}>
|
104 |
Question: <{question}>
|
105 |
+
Answer here:
|
106 |
+
Title:
|
107 |
+
News:"""
|
108 |
self.prompt = PromptTemplate(template=prompt_template,
|
109 |
input_variables=["context", "question"],
|
110 |
partial_variables={"min_words": min_words, "max_words": max_words})
|