Error: PeftModelForCausalLM.generate() takes 1 positional argument but 2 were given,import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
import textwrap

peft_model_id = "nomic-ai/gpt4all-j"
config = PeftConfig.from_pretrained(peft_model_id)

model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, 
                                             return_dict=True, 
                                             load_in_8bit=True, 
                                             device_map='auto')

tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)

# Load the Lora model
model = PeftModel.from_pretrained(model, peft_model_id)

MAX_LENGTH = 100

def generate_second_summary(text):
    # Initialize the second summary
    summary = ""

    try:
        # Encode the input text
        input_ids = tokenizer.encode(text, return_tensors='pt')

        # Truncate or pad the input text to a fixed length
        input_ids = input_ids[:, :MAX_LENGTH]

        # Generate the summary
        summary_ids = model.generate(input_ids, max_length=120, num_beams=2, no_repeat_ngram_size=1, early_stopping=True)

    except Exception as e:
        print(f"Failed to generate summary for text: {text}. Error: {e}")
    
    else:
        summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)

    return summary

# Filter the DataFrame to include only rows where 'summary' is not empty
df3 = df3[df3['summary'].appl