dromerosm commited on
Commit
5f96800
·
verified ·
1 Parent(s): fe4c13c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -2,7 +2,10 @@ import os
2
  import gradio as gr
3
  import cohere
4
  from crewai import Agent, Task, Crew, Process
 
5
  from langchain_groq import ChatGroq
 
 
6
  from langchain_community.tools import DuckDuckGoSearchRun, DuckDuckGoSearchResults
7
  from crewai_tools import tool, SeleniumScrapingTool, ScrapeWebsiteTool
8
 
@@ -77,13 +80,18 @@ def kickoff_crew(topic: str) -> dict:
77
 
78
  # Initialize the Groq large language model
79
  groq_llm_70b = ChatGroq(temperature=0, groq_api_key=groq_api_key, model_name="llama3-70b-8192")
 
 
 
 
 
80
 
81
  # Define Agents with Groq LLM
82
  researcher = Agent(
83
  role='Researcher',
84
  goal='Collect detailed information on {topic}',
85
  tools=[search_results, web_scrapper],
86
- llm=groq_llm_70b, # Assigning the Groq LLM here
87
  backstory=(
88
  "As a diligent researcher, you explore the depths of the internet to "
89
  "unearth crucial information and insights on the assigned topics. "
@@ -102,7 +110,7 @@ def kickoff_crew(topic: str) -> dict:
102
  editor = Agent(
103
  role='Editor',
104
  goal='Compile and refine the information into a comprehensive report on {topic}',
105
- llm=groq_llm_70b, # Assigning the Groq LLM here
106
  backstory=(
107
  "With a keen eye for detail and a strong command of language, you transform "
108
  "raw data into polished, insightful reports that are both informative and engaging. "
 
2
  import gradio as gr
3
  import cohere
4
  from crewai import Agent, Task, Crew, Process
5
+
6
  from langchain_groq import ChatGroq
7
+ from langchain_cohere import ChatCohere
8
+
9
  from langchain_community.tools import DuckDuckGoSearchRun, DuckDuckGoSearchResults
10
  from crewai_tools import tool, SeleniumScrapingTool, ScrapeWebsiteTool
11
 
 
80
 
81
  # Initialize the Groq large language model
82
  groq_llm_70b = ChatGroq(temperature=0, groq_api_key=groq_api_key, model_name="llama3-70b-8192")
83
+ cohere_llm = ChatCohere(
84
+ temperature=0.2,
85
+ cohere_api_key=cohere_api_key,
86
+ model="command-r-plus"
87
+ )
88
 
89
  # Define Agents with Groq LLM
90
  researcher = Agent(
91
  role='Researcher',
92
  goal='Collect detailed information on {topic}',
93
  tools=[search_results, web_scrapper],
94
+ llm=cohere_llm, # Assigning the Groq LLM here
95
  backstory=(
96
  "As a diligent researcher, you explore the depths of the internet to "
97
  "unearth crucial information and insights on the assigned topics. "
 
110
  editor = Agent(
111
  role='Editor',
112
  goal='Compile and refine the information into a comprehensive report on {topic}',
113
+ llm=cohere_llm, # Assigning the Groq LLM here
114
  backstory=(
115
  "With a keen eye for detail and a strong command of language, you transform "
116
  "raw data into polished, insightful reports that are both informative and engaging. "