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