PhantHive commited on
Commit
c0b7aa4
1 Parent(s): d1460a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 = 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
 
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():