From cd1c03935dd8ed75df87650ac3b82c9510856440 Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Sun, 24 Nov 2024 10:36:46 -0500 Subject: [PATCH] update prompt --- backend/generate_answer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/generate_answer.py b/backend/generate_answer.py index c3581d6..030402d 100644 --- a/backend/generate_answer.py +++ b/backend/generate_answer.py @@ -53,7 +53,7 @@ def get_device(): def generate_initial_note(page_content, model, tokenizer): device = "cuda" if torch.cuda.is_available() else "cpu" - inputs = tokenizer(f"Generate notes for the given content: {page_content}", return_tensors="pt").to(device) + inputs = tokenizer(f"Generate notes for the given content: {page_content}\n\nDo not include the original content in your answer.", return_tensors="pt").to(device) outputs = model.generate( **inputs, max_length=2048,