Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,18 +114,35 @@ def crewai_process_gemini(research_topic):
|
|
| 114 |
|
| 115 |
# Create tasks for your agents
|
| 116 |
task1 = Task(
|
| 117 |
-
description=f"""From {research_topic}
|
| 118 |
-
|
| 119 |
-
agent=GeminiAgent
|
| 120 |
)
|
| 121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
# Instantiate your crew with a sequential process
|
| 123 |
crew = Crew(
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
)
|
|
|
|
| 129 |
|
| 130 |
# Get your crew to work!
|
| 131 |
result = crew.kickoff()
|
|
@@ -721,7 +738,7 @@ with tab3:
|
|
| 721 |
|
| 722 |
|
| 723 |
with tab4:
|
| 724 |
-
st.header("
|
| 725 |
|
| 726 |
|
| 727 |
# Creating columns for the layout
|
|
|
|
| 114 |
|
| 115 |
# Create tasks for your agents
|
| 116 |
task1 = Task(
|
| 117 |
+
description=f"""From {research_topic} analyze individual sensor data and determine if each sensor is functioning properly, identify any necessary tuning adjustments, and calculate its hallucination level. BE VERBOSE.""",
|
| 118 |
+
agent=GreenEnvironmentSensorOptimizer
|
|
|
|
| 119 |
)
|
| 120 |
|
| 121 |
+
# Create tasks for your agents
|
| 122 |
+
task2 = Task(
|
| 123 |
+
description=f"""From {research_topic} analyze individual sensor data and determine if each sensor is functioning properly, identify any necessary tuning adjustments, and calculate its hallucination level. BE VERBOSE.""",
|
| 124 |
+
agent=SensorTuningEvaluator
|
| 125 |
+
)
|
| 126 |
+
|
| 127 |
+
# Create tasks for your agents
|
| 128 |
+
task3 = Task(
|
| 129 |
+
description=(
|
| 130 |
+
"Using insights from GreenEnvironmentSensorOptimizer agent providing Groundedness and SensorTuningEvaluator agent providing Hallucinations calculate the HIN number for the sensors which is groundedness times hallucinations"
|
| 131 |
+
"Provide number and rationale of the GreenEnvironmentSensorOptimizer and SensorTuningEvaluator agent to support your HIN calculation"
|
| 132 |
+
),
|
| 133 |
+
expected_output='A comprehensive full report on the latest AI advancements in 2024, leave nothing out',
|
| 134 |
+
agent=HINCalculator,
|
| 135 |
+
)
|
| 136 |
+
|
| 137 |
+
|
| 138 |
# Instantiate your crew with a sequential process
|
| 139 |
crew = Crew(
|
| 140 |
+
agents=[GreenEnvironmentSensorOptimizer, writer, HINCalculator],
|
| 141 |
+
tasks=[task1, task2, task3],
|
| 142 |
+
verbose=2,
|
| 143 |
+
process=Process.sequential
|
| 144 |
)
|
| 145 |
+
|
| 146 |
|
| 147 |
# Get your crew to work!
|
| 148 |
result = crew.kickoff()
|
|
|
|
| 738 |
|
| 739 |
|
| 740 |
with tab4:
|
| 741 |
+
st.header("Gemini Antrhopic Agents")
|
| 742 |
|
| 743 |
|
| 744 |
# Creating columns for the layout
|