Update main.py
Browse files
main.py
CHANGED
|
@@ -75,7 +75,7 @@ async def summarize_email(email: EmailRequest):
|
|
| 75 |
prompt = create_email_prompt(email.subject, email.sender, email.recipients, email.body)
|
| 76 |
|
| 77 |
# Use the pipeline to generate the summary
|
| 78 |
-
summary = pipe(prompt)
|
| 79 |
|
| 80 |
return {"summary": summary}
|
| 81 |
|
|
|
|
| 75 |
prompt = create_email_prompt(email.subject, email.sender, email.recipients, email.body)
|
| 76 |
|
| 77 |
# Use the pipeline to generate the summary
|
| 78 |
+
summary = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
| 79 |
|
| 80 |
return {"summary": summary}
|
| 81 |
|