Update app.py
Browse files
app.py
CHANGED
@@ -25,10 +25,10 @@ model = PeftModel.from_pretrained(model, model_id)
|
|
25 |
def greet(text):
|
26 |
with torch.no_grad():
|
27 |
# Include EOS token for better context
|
28 |
-
input_text =
|
29 |
-
f
|
30 |
-
|
31 |
-
|
32 |
batch = tokenizer(input_text, return_tensors='pt', add_special_tokens=True).to(device)
|
33 |
|
34 |
with torch.cuda.amp.autocast():
|
|
|
25 |
def greet(text):
|
26 |
with torch.no_grad():
|
27 |
# Include EOS token for better context
|
28 |
+
input_text = "<s>### Instruction:\nYou are a data analyst tasked with helping students finding resources, respond in JSON format.\n\n" +
|
29 |
+
f"### Input:\n{text}\n\n" +
|
30 |
+
"### Response:\n"
|
31 |
+
|
32 |
batch = tokenizer(input_text, return_tensors='pt', add_special_tokens=True).to(device)
|
33 |
|
34 |
with torch.cuda.amp.autocast():
|