Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def generate_questions(email_text):
|
|
11 |
inputs = tokenizer(email_text, return_tensors="pt", max_length=1024, truncation=True)
|
12 |
|
13 |
# Generate questions
|
14 |
-
summary_ids = model.generate(inputs["input_ids"], num_beams=4, max_length=
|
15 |
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
16 |
|
17 |
return summary
|
|
|
11 |
inputs = tokenizer(email_text, return_tensors="pt", max_length=1024, truncation=True)
|
12 |
|
13 |
# Generate questions
|
14 |
+
summary_ids = model.generate(inputs["input_ids"], num_beams=4, max_length=500, early_stopping=True)
|
15 |
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
16 |
|
17 |
return summary
|