Skip to content

Commit

Permalink
added senitment analysis model
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansub committed Feb 12, 2025
1 parent b414bf3 commit 891ce46
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cookbook/agent_concepts/multimodal/audio_sentiment_analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import requests
from agno.agent import Agent
from agno.media import Audio
from agno.models.google import Gemini

agent = Agent(
model=Gemini(id="gemini-2.0-flash-exp"),
markdown=True,
)

url = "https://storage.googleapis.com/github-repo/generative-ai/gemini/use-cases/multimodal-sentiment-analysis/sample_conversation.wav"

response = requests.get(url)
audio_content = response.content

# Give a sentiment analysis of this audio conversation. Use speaker A, speaker B to identify speakers.

agent.print_response(
"Give a sentiment analysis of this audio conversation. Use speaker A, speaker B to identify speakers.",
audio=[Audio(content=audio_content)],
stream=True,
)

0 comments on commit 891ce46

Please sign in to comment.