File size: 1,397 Bytes
d9b1770
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from dotenv import load_dotenv, find_dotenv
from textwrap import dedent

load_dotenv(find_dotenv())

from agents import CryptoAnalysisAgents
from tasks import CryptoAnalysisTasks
from crewai import Crew


class CryptoCrew:
    def __init__(self, coin):
        self.coin = coin

    def run(self):
        agents = CryptoAnalysisAgents()
        tasks = CryptoAnalysisTasks()

        crypto_analyst = agents.crypto_analyst()
        content_writer = agents.content_writer()

        research_task = tasks.research(crypto_analyst, self.coin)
        recommend_task = tasks.recommend(content_writer, self.coin)

        crew = Crew(
            agents=[
                crypto_analyst,
                content_writer,
            ],
            tasks=[
                research_task,
                recommend_task,
            ],
            verbose=True
        )

        result = crew.kickoff()
        return result

# if __name__ == "__main__":
#     print("## Welcome to Crypto Analysis Crew")
#     print('-------------------------------')
#     company = input(
#         dedent("""
#             Which cryptocurrency are you looking to delve into?
#     """))

#     crypto_crew = CryptoCrew(company)
#     result = crypto_crew.run()
#     print("\n\n########################")
#     print("## Here is the Report")
#     print("########################\n")
    
# print(result)