Spaces:
Runtime error
Runtime error
Fix v3
Browse files25 unmodified lines2627282930313225 unmodified lines# 'title': usertitle,# 'content': content# }input_text = f"[[[title:]]] {usertitle}\n[[[content:]]]{content}\n\nThe following is an interaction between a user and an AI assistant that is related to the above text.\n\n[[[User]]]"inputs = tokenizer(input_text, return_tensors='pt').to('cuda')attention_mask = torch.ones(inputs['input_ids'].shape, dtype=torch.long, device='cuda')generated_sequences = model.generate(inputs['input_ids'], attention_mask=attention_mask, temperature=temperature, max_length=max_length, pad_token_id=tokenizer.eos_token_id, num_return_sequences=N, do_sample=True)25 unmodified lines2627282930313225 unmodified lines# 'title': usertitle,# 'content': content# }input_text = f"[[[Title]]] {usertitle}\n[[[Content]]] {content.strip()}\n\nThe following is an interaction between a user and an AI assistant that is related to the above text.\n\n[[[User]]] "inputs = tokenizer(input_text, return_tensors='pt').to('cuda')attention_mask = torch.ones(inputs['input_ids'].shape, dtype=torch.long, device='cuda')generated_sequences = model.generate(inputs['input_ids'], attention_mask=attention_mask, temperature=temperature, max_length=max_length, pad_token_id=tokenizer.eos_token_id, num_return_sequences=N, do_sample=True)
app.py+1-1