Download tasks.py from yashmangal112/Blog-Writer-Multi-Agent-System: direct link, hf CLI and curl.
- Browser
- Download file 1.9 kB
-
https://huggingface.co/spaces/yashmangal112/Blog-Writer-Multi-Agent-System/resolve/main/tasks.py
- Command line
-
hf download hf://spaces/yashmangal112/Blog-Writer-Multi-Agent-System/tasks.py
-
curl -L -o tasks.py https://huggingface.co/spaces/yashmangal112/Blog-Writer-Multi-Agent-System/resolve/main/tasks.py
1.9 kB
| from crewai import Task | |
| from agents import content_planner, blog_writer, editor | |
| # Task for Content Planner | |
| plan_task = Task( | |
| description=( | |
| "1. Prioritize the latest trends, key players, " | |
| "and noteworthy news on {topic}.\n" | |
| "2. Identify the target audience, considering " | |
| "their interests and pain points.\n" | |
| "3. Develop a detailed content outline including " | |
| "an introduction, key points, and a call to action.\n" | |
| "4. Include SEO keywords and relevant data or sources." | |
| ), | |
| expected_output="A comprehensive content plan document " | |
| "with an outline, audience analysis, " | |
| "SEO keywords, and resources.", | |
| agent=content_planner, | |
| ) | |
| # Task for Blog Writer | |
| write_task = Task( | |
| description=( | |
| "1. Use the content plan to craft a compelling " | |
| "blog post on {topic}.\n" | |
| "2. Incorporate SEO keywords naturally.\n" | |
| "3. Sections/Subtitles are properly named " | |
| "in an engaging manner.\n" | |
| "4. Ensure the post is structured with an " | |
| "engaging introduction, insightful body, " | |
| "and a summarizing conclusion.\n" | |
| "5. Proofread for grammatical errors and " | |
| "alignment with the brand's voice.\n" | |
| ), | |
| expected_output="A well-written blog post " | |
| "in markdown format, ready for publication, " | |
| "each section should have 2 or 3 paragraphs.", | |
| agent=blog_writer, | |
| ) | |
| # Task for Editor | |
| edit_task = Task( | |
| description=("Proofread the given blog post for " | |
| "grammatical errors and " | |
| "alignment with the brand's voice."), | |
| expected_output="A well-written blog post in markdown format, " | |
| "ready for publication, " | |
| "each section should have 2 or 3 paragraphs.", | |
| agent=editor | |
| ) |