eaglelandsonce's picture
Update app.py
d2ca388
raw
history blame
1.31 kB
from crewai import *
import gradio as gr
def run_crew():
researcher = Agent(
role='Senior Research Analyst',
goal='Uncover cutting-edge developments in AI and data science',
backstory="""You are a Senior Research Analyst at a leading tech think tank...""",
verbose=True,
allow_delegation=False
)
writer = Agent(
role='Tech Content Strategist',
goal='Craft compelling content on tech advancements',
backstory="""You are a renowned Tech Content Strategist...""",
verbose=True,
allow_delegation=False
)
task1 = Task(
description="""Conduct a comprehensive analysis of the latest advancements in AI in 2024...""",
agent=researcher
)
task2 = Task(
description="""Using the insights from the researcher's report, develop an engaging blog post...""",
agent=writer
)
crew = Crew(
agents=[researcher, writer],
tasks=[task1, task2],
verbose=2,
process=Process.sequential
)
result = crew.kickoff()
return result
iface = gr.Interface(
fn=run_crew,
inputs=[],
outputs="text",
title="AI Research and Writing Crew",
description="Run a crew of AI agents to perform research and writing tasks."
)
iface.launch()