-
-
Notifications
You must be signed in to change notification settings - Fork 781
Expand file tree
/
Copy pathvideo-agent.py
More file actions
35 lines (31 loc) · 997 Bytes
/
video-agent.py
File metadata and controls
35 lines (31 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from praisonaiagents import Agent, Task, AgentTeam
# Create Video Analysis Agent
video_agent = Agent(
name="VideoAnalyst",
role="Video Analysis Specialist",
goal="Analyze images and videos to extract meaningful information",
backstory="""You are an expert in computer vision and image analysis.
You excel at describing images, detecting objects, and understanding visual content.""",
llm="gpt-4o-mini",
reflection=False
)
# Task with Video File
task1 = Task(
name="analyze_video",
description="""Watch this video and provide:
1. A summary of the main events
2. Key objects and people visible
3. Any text or important information shown
4. The overall context and setting""",
expected_output="Comprehensive analysis of the video content",
agent=video_agent,
images=["video.mp4"]
)
# Create Agents instance
agents = AgentTeam(
agents=[video_agent],
tasks=[task1],
process="sequential",
)
# Run all tasks
agents.start()