Views
No views yet
google/t5-efficient-tiny (~16M params)1import { pipeline } from "@huggingface/transformers";
2const cron = await pipeline("text2text-generation", "pavstev/cronlm");
3const out = await cron("every weekday at 9am".toLowerCase());
4console.log(out[0].generated_text); // "0 9 * * 1-5"1from transformers import pipeline
2cron = pipeline("text2text-generation", model="pavstev/cronlm")
3print(cron("every weekday at 9am")[0]["generated_text"]) # "0 9 * * 1-5"| Input | Output |
|---|---|
| every 5 minutes | */5 * * * * |
| every weekday at 9am | 0 9 * * 1-5 |
| at 10:30 PM on Sundays | 30 22 * * 0 |
| every 15 minutes between 9 and 17 | */15 9-17 * * * |
| every Mon and Wed at noon | 0 12 * * 1,3 |
| on the 1st of every month | 0 0 1 * * |
| every quarter | 0 0 1 1,4,7,10 * |
| at midnight | 0 0 * * * |
@daily | 0 0 * * * |
| MWF at 9am | 0 9 * * 1,3,5 |
| every December 25 | 0 0 25 12 * |
| from the 1st to the 5th at noon | 0 12 1-5 * * |
| every 30 minutes during business hours | */30 9-17 * * 1-5 |
cronlm package — wrap model output to catch any rare invalid generation:1from cronlm import fix
2fix("0 25 * * 1") # "0 23 * * 1"