Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import asyncio
|
| 2 |
-
from crewai import Crew
|
| 3 |
from textwrap import dedent
|
| 4 |
import json
|
| 5 |
from crypto_analysis_agents import CryptoAnalysisAgents
|
|
@@ -15,16 +15,16 @@ class CryptoCrew:
|
|
| 15 |
async def run_async(self):
|
| 16 |
agents = CryptoAnalysisAgents()
|
| 17 |
tasks = CryptoAnalysisTasks()
|
| 18 |
-
|
| 19 |
market_analyst_agent = agents.market_analyst()
|
| 20 |
technical_analyst_agent = agents.technical_analyst()
|
| 21 |
crypto_advisor_agent = agents.crypto_advisor()
|
| 22 |
-
|
| 23 |
market_research_task = tasks.market_research(market_analyst_agent, self.crypto)
|
| 24 |
technical_analysis_task = tasks.technical_analysis(technical_analyst_agent, self.crypto)
|
| 25 |
sentiment_analysis_task = tasks.sentiment_analysis(market_analyst_agent, self.crypto)
|
| 26 |
recommend_task = tasks.recommend(crypto_advisor_agent, self.crypto)
|
| 27 |
-
|
| 28 |
crew = Crew(
|
| 29 |
agents=[
|
| 30 |
market_analyst_agent,
|
|
@@ -42,7 +42,7 @@ class CryptoCrew:
|
|
| 42 |
max_iterations=100,
|
| 43 |
task_timeout=300
|
| 44 |
)
|
| 45 |
-
|
| 46 |
try:
|
| 47 |
result = await asyncio.to_thread(crew.kickoff)
|
| 48 |
return self.parse_result(result)
|
|
|
|
| 1 |
import asyncio
|
| 2 |
+
from crewai import Crew, Process
|
| 3 |
from textwrap import dedent
|
| 4 |
import json
|
| 5 |
from crypto_analysis_agents import CryptoAnalysisAgents
|
|
|
|
| 15 |
async def run_async(self):
|
| 16 |
agents = CryptoAnalysisAgents()
|
| 17 |
tasks = CryptoAnalysisTasks()
|
| 18 |
+
|
| 19 |
market_analyst_agent = agents.market_analyst()
|
| 20 |
technical_analyst_agent = agents.technical_analyst()
|
| 21 |
crypto_advisor_agent = agents.crypto_advisor()
|
| 22 |
+
|
| 23 |
market_research_task = tasks.market_research(market_analyst_agent, self.crypto)
|
| 24 |
technical_analysis_task = tasks.technical_analysis(technical_analyst_agent, self.crypto)
|
| 25 |
sentiment_analysis_task = tasks.sentiment_analysis(market_analyst_agent, self.crypto)
|
| 26 |
recommend_task = tasks.recommend(crypto_advisor_agent, self.crypto)
|
| 27 |
+
|
| 28 |
crew = Crew(
|
| 29 |
agents=[
|
| 30 |
market_analyst_agent,
|
|
|
|
| 42 |
max_iterations=100,
|
| 43 |
task_timeout=300
|
| 44 |
)
|
| 45 |
+
|
| 46 |
try:
|
| 47 |
result = await asyncio.to_thread(crew.kickoff)
|
| 48 |
return self.parse_result(result)
|