sooolee commited on
Commit
808dfbc
1 Parent(s): 7cde100

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ def summarize(video_id):
54
  inputs = tokenizer(texts, return_tensors="pt", padding=True, )
55
 
56
  with torch.no_grad():
57
- output_tokens = model.generate(input_ids=inputs["input_ids"].to("device"), max_new_tokens=60, do_sample=True, top_p=0.9)
58
  outputs = tokenizer.batch_decode(output_tokens.detach().cpu().numpy(), skip_special_tokens=True)
59
 
60
  return outputs
 
54
  inputs = tokenizer(texts, return_tensors="pt", padding=True, )
55
 
56
  with torch.no_grad():
57
+ output_tokens = model.generate(input_ids=inputs["input_ids"].to(device), max_new_tokens=60, do_sample=True, top_p=0.9)
58
  outputs = tokenizer.batch_decode(output_tokens.detach().cpu().numpy(), skip_special_tokens=True)
59
 
60
  return outputs