PhantHive commited on
Commit
c320d77
·
verified ·
1 Parent(s): f92a739

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -25,7 +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>### Input:\n{text}\n\n### Response:\n'
 
 
 
29
  batch = tokenizer(input_text, return_tensors='pt', add_special_tokens=True).to(device)
30
 
31
  with torch.cuda.amp.autocast():
 
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():