Update app.py
Browse files
app.py
CHANGED
|
@@ -167,17 +167,20 @@ class Reviewer:
|
|
| 167 |
cnt += 1
|
| 168 |
text = retrieval_content + content
|
| 169 |
chat_review_limitations = self.chat_review(text=text)
|
|
|
|
| 170 |
else:
|
| 171 |
text = content
|
| 172 |
chat_review_limitations = self.chat_review(text=text)
|
| 173 |
retrieved_papers = ""
|
|
|
|
| 174 |
else:
|
| 175 |
text = content
|
| 176 |
chat_review_limitations = self.chat_review(text=text)
|
| 177 |
retrieved_papers = ""
|
|
|
|
| 178 |
|
| 179 |
-
text = f"Paper:\n{paper['content']}\n\n"
|
| 180 |
-
chat_review_text = self.chat_refine(text=text, limitations=chat_review_limitations)
|
| 181 |
return chat_review_text, retrieved_papers
|
| 182 |
|
| 183 |
def query_gen(self, abstract):
|
|
@@ -418,7 +421,7 @@ Organize the result in JSON format as follows:
|
|
| 418 |
messages = []
|
| 419 |
for limitation in limitations:
|
| 420 |
message=[
|
| 421 |
-
{"role": "system", "content": f"Read the following scientific paper and
|
| 422 |
{"role": "user", "content": f"{text}\nLimitation: {limitation}"},
|
| 423 |
]
|
| 424 |
messages.append(message)
|
|
|
|
| 167 |
cnt += 1
|
| 168 |
text = retrieval_content + content
|
| 169 |
chat_review_limitations = self.chat_review(text=text)
|
| 170 |
+
chat_review_text = self.chat_refine(text=text, limitations=chat_review_limitations)
|
| 171 |
else:
|
| 172 |
text = content
|
| 173 |
chat_review_limitations = self.chat_review(text=text)
|
| 174 |
retrieved_papers = ""
|
| 175 |
+
chat_review_text = self.chat_refine(text=text, limitations=chat_review_limitations)
|
| 176 |
else:
|
| 177 |
text = content
|
| 178 |
chat_review_limitations = self.chat_review(text=text)
|
| 179 |
retrieved_papers = ""
|
| 180 |
+
chat_review_text = self.chat_refine(text=text, limitations=chat_review_limitations)
|
| 181 |
|
| 182 |
+
# text = f"Paper:\n{paper['content']}\n\n"
|
| 183 |
+
# chat_review_text = self.chat_refine(text=text, limitations=chat_review_limitations)
|
| 184 |
return chat_review_text, retrieved_papers
|
| 185 |
|
| 186 |
def query_gen(self, abstract):
|
|
|
|
| 421 |
messages = []
|
| 422 |
for limitation in limitations:
|
| 423 |
message=[
|
| 424 |
+
{"role": "system", "content": f"Read the following scientific paper, its limitation, and several relevant papers to gain knowledge of the relevant field. Using insights from the relevant papers, provide a highly specific and actionable suggestion to address the limitation in the paper to review. If suggesting an additional dataset, specify the exact dataset(s) by name. If proposing a methodological change, describe the specific modification. Keep the response within 50 words."} ,
|
| 425 |
{"role": "user", "content": f"{text}\nLimitation: {limitation}"},
|
| 426 |
]
|
| 427 |
messages.append(message)
|