Akshayram1 commited on
Commit
31c2376
·
verified ·
1 Parent(s): 9f50ed7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -95,23 +95,23 @@ if generate_blog:
95
  agent=blog_writer
96
  )
97
 
98
- # Create crew
99
  crew = Crew(
100
  agents=[blog_researcher, blog_writer],
101
  tasks=[research_task, write_task],
102
  process=Process.sequential,
103
- verbose=2
104
  )
105
 
106
  try:
107
- # Kickoff the process
108
- result = crew.kickoff()
109
 
110
  # Extract blog content from the result
111
- if hasattr(result, 'task_output'):
112
- blog_content = result.task_output
113
  else:
114
- # If task_output is not available, try to get the raw result
115
  blog_content = str(result)
116
 
117
  # Display the blog content
 
95
  agent=blog_writer
96
  )
97
 
98
+ # Create crew - Fixed verbose parameter to be boolean
99
  crew = Crew(
100
  agents=[blog_researcher, blog_writer],
101
  tasks=[research_task, write_task],
102
  process=Process.sequential,
103
+ verbose=True # Changed from 2 to True
104
  )
105
 
106
  try:
107
+ # Kickoff the process with the news link as input
108
+ result = crew.kickoff(inputs={'topic': news_link})
109
 
110
  # Extract blog content from the result
111
+ if hasattr(result, 'tasks_output'):
112
+ blog_content = result.tasks_output[-1].raw # Get the last task's output
113
  else:
114
+ # If tasks_output is not available, try to get the raw result
115
  blog_content = str(result)
116
 
117
  # Display the blog content