hikinegi commited on
Commit
a238007
β€’
1 Parent(s): b8ec9e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def generate_pred(text):
18
  with torch.no_grad():
19
  # generate
20
  text=f"<s>[INST]<<SYS>>\nBelow is an instruction that describes a task. Write a response that appropriately completes the request.\n<</SYS>>\n{text}[/INST]"
21
- inputs = tokenizer(text, return_tensors="pt").to("cuda")
22
  outputs = model.generate(input_ids=inputs["input_ids"],
23
  attention_mask=inputs["attention_mask"],
24
  max_new_tokens=1024,
 
18
  with torch.no_grad():
19
  # generate
20
  text=f"<s>[INST]<<SYS>>\nBelow is an instruction that describes a task. Write a response that appropriately completes the request.\n<</SYS>>\n{text}[/INST]"
21
+ inputs = tokenizer(text, return_tensors="pt") #.to("cuda")
22
  outputs = model.generate(input_ids=inputs["input_ids"],
23
  attention_mask=inputs["attention_mask"],
24
  max_new_tokens=1024,