Download src/mailing_utils.py from lenox-ai/prototype: direct link, hf CLI and curl.
- Browser
- Download file 458 Bytes
-
https://huggingface.co/spaces/lenox-ai/prototype/resolve/main/src/mailing_utils.py
- Command line
-
hf download hf://spaces/lenox-ai/prototype/src/mailing_utils.py
-
curl -L -o mailing_utils.py https://huggingface.co/spaces/lenox-ai/prototype/resolve/main/src/mailing_utils.py
458 Bytes
| import urllib.parse | |
| def construct_url(address: str, subject: str, body: str): | |
| return f"mailto:{address}?subject={subject}&body={body}" | |
| def update_email_content(email_wrapping_content: str, summary: str) -> str: | |
| if "<TEXT_FROM_LLM>" in email_wrapping_content: | |
| email_content = email_wrapping_content.replace("<TEXT_FROM_LLM>", summary) | |
| else: | |
| email_content = email_wrapping_content + "\n\n" + summary | |
| return email_content |