Spaces:
Sleeping
Sleeping
updated
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ base_model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME)
|
|
20 |
model = PeftModel.from_pretrained(base_model, "Komal-patra/results")
|
21 |
|
22 |
# Text generation function
|
23 |
-
def generate_text(prompt, max_length=
|
24 |
inputs = tokenizer(prompt, return_tensors="pt")
|
25 |
outputs = model.generate(
|
26 |
input_ids=inputs["input_ids"],
|
|
|
20 |
model = PeftModel.from_pretrained(base_model, "Komal-patra/results")
|
21 |
|
22 |
# Text generation function
|
23 |
+
def generate_text(prompt, max_length=512):
|
24 |
inputs = tokenizer(prompt, return_tensors="pt")
|
25 |
outputs = model.generate(
|
26 |
input_ids=inputs["input_ids"],
|