zjXu11 commited on
Commit
7cbc3c2
·
verified ·
1 Parent(s): 58321e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -419,9 +419,14 @@ Organize the result in JSON format as follows:
419
  client = AsyncOpenAI()
420
 
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)
 
419
  client = AsyncOpenAI()
420
 
421
  messages = []
422
+ if self.enable_rag:
423
+ SYSTEM_INPUT = "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."
424
+ else:
425
+ SYSTEM_INPUT = "Read the following scientific paper and its limitation, and provide a highly specific and actionable suggestion to address the limitation. 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."
426
+
427
  for limitation in limitations:
428
  message=[
429
+ {"role": "system", "content": SYSTEM_INPUT},
430
  {"role": "user", "content": f"{text}\nLimitation: {limitation}"},
431
  ]
432
  messages.append(message)