Spaces:
Runtime error
Runtime error
eaglelandsonce
commited on
Commit
•
cd4dd2c
1
Parent(s):
445cf92
Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,9 @@ gemini_llm = GoogleGenerativeAI(model="gemini-pro", google_api_key=GOOGLE_AI_STU
|
|
39 |
def crewai_process_gemini(research_topic):
|
40 |
# Define your agents with roles and goals
|
41 |
GeminiAgent = Agent(
|
42 |
-
role='
|
43 |
-
goal='To
|
44 |
-
backstory="""
|
45 |
verbose=True,
|
46 |
allow_delegation=False,
|
47 |
llm = gemini_llm,
|
@@ -55,7 +55,8 @@ def crewai_process_gemini(research_topic):
|
|
55 |
|
56 |
# Create tasks for your agents
|
57 |
task1 = Task(
|
58 |
-
description=f"""
|
|
|
59 |
agent=GeminiAgent
|
60 |
)
|
61 |
|
@@ -77,9 +78,9 @@ def crewai_process_gemini(research_topic):
|
|
77 |
def crewai_process_mixtral_crazy(research_topic):
|
78 |
# Define your agents with roles and goals
|
79 |
MixtralCrazyAgent = Agent(
|
80 |
-
role='
|
81 |
-
goal='
|
82 |
-
backstory="""
|
83 |
verbose=True,
|
84 |
allow_delegation=False,
|
85 |
llm = gemini_llm,
|
@@ -92,7 +93,8 @@ def crewai_process_mixtral_crazy(research_topic):
|
|
92 |
|
93 |
# Create tasks for your agents
|
94 |
task1 = Task(
|
95 |
-
description=f"""
|
|
|
96 |
agent=MixtralCrazyAgent
|
97 |
)
|
98 |
|
@@ -113,9 +115,9 @@ def crewai_process_mixtral_crazy(research_topic):
|
|
113 |
def crewai_process_mixtral_normal(research_topic):
|
114 |
# Define your agents with roles and goals
|
115 |
MixtralNormalAgent = Agent(
|
116 |
-
role='
|
117 |
-
goal='
|
118 |
-
backstory="""
|
119 |
verbose=True,
|
120 |
allow_delegation=False,
|
121 |
llm = gemini_llm,
|
@@ -128,7 +130,8 @@ def crewai_process_mixtral_normal(research_topic):
|
|
128 |
|
129 |
# Create tasks for your agents
|
130 |
task1 = Task(
|
131 |
-
description=f"""
|
|
|
132 |
agent=MixtralNormalAgent
|
133 |
)
|
134 |
|
@@ -149,9 +152,9 @@ def crewai_process_mixtral_normal(research_topic):
|
|
149 |
def crewai_process_zephyr_normal(research_topic):
|
150 |
# Define your agents with roles and goals
|
151 |
ZephrNormalAgent = Agent(
|
152 |
-
role='
|
153 |
-
goal='
|
154 |
-
backstory="""
|
155 |
verbose=True,
|
156 |
allow_delegation=False,
|
157 |
llm = gemini_llm,
|
@@ -164,7 +167,8 @@ def crewai_process_zephyr_normal(research_topic):
|
|
164 |
|
165 |
# Create tasks for your agents
|
166 |
task1 = Task(
|
167 |
-
description=f"""
|
|
|
168 |
agent=ZephrNormalAgent
|
169 |
)
|
170 |
|
@@ -185,9 +189,9 @@ def crewai_process_zephyr_normal(research_topic):
|
|
185 |
def crewai_process_phi2(research_topic):
|
186 |
# Define your agents with roles and goals
|
187 |
Phi2Agent = Agent(
|
188 |
-
role='
|
189 |
-
goal='
|
190 |
-
backstory="""
|
191 |
verbose=True,
|
192 |
allow_delegation=False,
|
193 |
llm = gemini_llm,
|
@@ -200,7 +204,8 @@ def crewai_process_phi2(research_topic):
|
|
200 |
|
201 |
# Create tasks for your agents
|
202 |
task1 = Task(
|
203 |
-
description=f"""
|
|
|
204 |
agent=Phi2Agent
|
205 |
)
|
206 |
|
@@ -221,10 +226,6 @@ def crewai_process_phi2(research_topic):
|
|
221 |
|
222 |
|
223 |
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
# Initialize the HHEM model +++++++++++++++++++++++++++++++++++++++++++++++
|
229 |
model = CrossEncoder('vectara/hallucination_evaluation_model')
|
230 |
|
|
|
39 |
def crewai_process_gemini(research_topic):
|
40 |
# Define your agents with roles and goals
|
41 |
GeminiAgent = Agent(
|
42 |
+
role='Summary Evaluator',
|
43 |
+
goal='To learn how to manage her anxiety in social situations through group therapy.',
|
44 |
+
backstory="""Skilled in running query evaluation""",
|
45 |
verbose=True,
|
46 |
allow_delegation=False,
|
47 |
llm = gemini_llm,
|
|
|
55 |
|
56 |
# Create tasks for your agents
|
57 |
task1 = Task(
|
58 |
+
description=f"""From {research_topic} create your story by writing at least one sentence about each bullet point from each of the five scenes
|
59 |
+
and make sure you have a transitional statement between scenes . BE VERBOSE.""",
|
60 |
agent=GeminiAgent
|
61 |
)
|
62 |
|
|
|
78 |
def crewai_process_mixtral_crazy(research_topic):
|
79 |
# Define your agents with roles and goals
|
80 |
MixtralCrazyAgent = Agent(
|
81 |
+
role='Summary Evaluator',
|
82 |
+
goal='Evaluate the summary using the HHEM-Victara Tuner',
|
83 |
+
backstory="""Skilled in running query evaluation""",
|
84 |
verbose=True,
|
85 |
allow_delegation=False,
|
86 |
llm = gemini_llm,
|
|
|
93 |
|
94 |
# Create tasks for your agents
|
95 |
task1 = Task(
|
96 |
+
description=f"""From {research_topic} create your story by writing at least one sentence about each bullet point from each of the five scenes
|
97 |
+
and make sure you have a transitional statement between scenes . BE VERBOSE.""",
|
98 |
agent=MixtralCrazyAgent
|
99 |
)
|
100 |
|
|
|
115 |
def crewai_process_mixtral_normal(research_topic):
|
116 |
# Define your agents with roles and goals
|
117 |
MixtralNormalAgent = Agent(
|
118 |
+
role='Summary Evaluator',
|
119 |
+
goal='Evaluate the summary using the HHEM-Victara Tuner',
|
120 |
+
backstory="""Skilled in running query evaluation""",
|
121 |
verbose=True,
|
122 |
allow_delegation=False,
|
123 |
llm = gemini_llm,
|
|
|
130 |
|
131 |
# Create tasks for your agents
|
132 |
task1 = Task(
|
133 |
+
description=f"""From {research_topic} create your story by writing at least one sentence about each bullet point from each of the five scenes
|
134 |
+
and make sure you have a transitional statement between scenes . BE VERBOSE.""",
|
135 |
agent=MixtralNormalAgent
|
136 |
)
|
137 |
|
|
|
152 |
def crewai_process_zephyr_normal(research_topic):
|
153 |
# Define your agents with roles and goals
|
154 |
ZephrNormalAgent = Agent(
|
155 |
+
role='Summary Evaluator',
|
156 |
+
goal='Evaluate the summary using the HHEM-Victara Tuner',
|
157 |
+
backstory="""Skilled in running query evaluation""",
|
158 |
verbose=True,
|
159 |
allow_delegation=False,
|
160 |
llm = gemini_llm,
|
|
|
167 |
|
168 |
# Create tasks for your agents
|
169 |
task1 = Task(
|
170 |
+
description=f"""From {research_topic} create your story by writing at least one sentence about each bullet point from each of the five scenes
|
171 |
+
and make sure you have a transitional statement between scenes . BE VERBOSE.""",
|
172 |
agent=ZephrNormalAgent
|
173 |
)
|
174 |
|
|
|
189 |
def crewai_process_phi2(research_topic):
|
190 |
# Define your agents with roles and goals
|
191 |
Phi2Agent = Agent(
|
192 |
+
role='Emily Mental Patient Graphic Designer Anxiety',
|
193 |
+
goal='Evaluate the summary using the HHEM-Victara Tuner',
|
194 |
+
backstory="""Skilled in running query evaluation""",
|
195 |
verbose=True,
|
196 |
allow_delegation=False,
|
197 |
llm = gemini_llm,
|
|
|
204 |
|
205 |
# Create tasks for your agents
|
206 |
task1 = Task(
|
207 |
+
description=f"""From {research_topic} create your story by writing at least one sentence about each bullet point from each of the five scenes
|
208 |
+
and make sure you have a transitional statement between scenes . BE VERBOSE.""",
|
209 |
agent=Phi2Agent
|
210 |
)
|
211 |
|
|
|
226 |
|
227 |
|
228 |
|
|
|
|
|
|
|
|
|
229 |
# Initialize the HHEM model +++++++++++++++++++++++++++++++++++++++++++++++
|
230 |
model = CrossEncoder('vectara/hallucination_evaluation_model')
|
231 |
|