Prathamesh1420 commited on
Commit
9a5e4ee
1 Parent(s): 36d2a7c

Update app.py

Browse files

max length in task

Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -11,8 +11,7 @@ load_dotenv()
11
  llm = HuggingFaceHub(
12
  repo_id="HuggingFaceH4/zephyr-7b-beta",
13
  huggingfacehub_api_token=os.getenv('HF_API_KEY'),
14
- task="text-generation",
15
- max_length=2048 # Increase max_length for more detailed output
16
  )
17
 
18
  # Define Agents
@@ -49,7 +48,8 @@ plan = Task(
49
  "1. Prioritize the latest trends, key players, and noteworthy news on {topic}.\n"
50
  "2. Identify the target audience, considering their interests and pain points.\n"
51
  "3. Develop a detailed content outline including an introduction, key points, and a call to action.\n"
52
- "4. Include SEO keywords and relevant data or sources."
 
53
  ),
54
  expected_output="A comprehensive content plan document with an outline, audience analysis, SEO keywords, and resources.",
55
  agent=planner,
@@ -62,7 +62,8 @@ write = Task(
62
  "3. Sections/Subtitles are properly named in an engaging manner.\n"
63
  "4. Ensure the post is structured with an engaging introduction, insightful body, and a summarizing conclusion.\n"
64
  "5. Proofread for grammatical errors and alignment with the brand's voice.\n"
65
- "6. Each section should have 2 or 3 paragraphs."
 
66
  ),
67
  expected_output="A well-written blog post in markdown format, ready for publication.",
68
  agent=writer,
 
11
  llm = HuggingFaceHub(
12
  repo_id="HuggingFaceH4/zephyr-7b-beta",
13
  huggingfacehub_api_token=os.getenv('HF_API_KEY'),
14
+ task="text-generation"
 
15
  )
16
 
17
  # Define Agents
 
48
  "1. Prioritize the latest trends, key players, and noteworthy news on {topic}.\n"
49
  "2. Identify the target audience, considering their interests and pain points.\n"
50
  "3. Develop a detailed content outline including an introduction, key points, and a call to action.\n"
51
+ "4. Include SEO keywords and relevant data or sources.\n"
52
+ "5. The plan should be detailed and cover all aspects of the topic."
53
  ),
54
  expected_output="A comprehensive content plan document with an outline, audience analysis, SEO keywords, and resources.",
55
  agent=planner,
 
62
  "3. Sections/Subtitles are properly named in an engaging manner.\n"
63
  "4. Ensure the post is structured with an engaging introduction, insightful body, and a summarizing conclusion.\n"
64
  "5. Proofread for grammatical errors and alignment with the brand's voice.\n"
65
+ "6. Each section should have 2 or 3 paragraphs.\n"
66
+ "7. The entire blog post should be at least 1000 words."
67
  ),
68
  expected_output="A well-written blog post in markdown format, ready for publication.",
69
  agent=writer,