Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,7 @@ def crewai_process(research_topic):
|
|
| 72 |
# Define your agents with roles and goals
|
| 73 |
GreenEnvironmentSensorOptimizer = Agent(
|
| 74 |
role='Environmental Sensor Optimization Specialist',
|
| 75 |
-
goal='To analyze the current green environment setup and sensor configurations, and provide recommendations for optimizing sensor placement and additions to achieve the desired goals.',
|
| 76 |
backstory="""You are an experienced environmental engineer specializing in sensor deployment and optimization for green environments like gardens, parks, and agricultural settings. With your deep understanding of sensor technology, data analysis, and environmental factors, you can evaluate the existing sensor setup and recommend improvements to enhance monitoring capabilities, increase efficiency, and better achieve the desired outcomes for the green environment.""",
|
| 77 |
verbose=True,
|
| 78 |
allow_delegation=False,
|
|
@@ -87,7 +87,7 @@ def crewai_process(research_topic):
|
|
| 87 |
# Define your agents with roles and goals
|
| 88 |
SensorTuningEvaluator = Agent(
|
| 89 |
role='Sensor Performance Analyst',
|
| 90 |
-
goal='To analyze individual sensor data and determine if each sensor is functioning properly, identify any necessary tuning adjustments, and calculate its hallucination level.',
|
| 91 |
backstory="""You are an experienced sensor technician responsible for ensuring optimal performance of individual sensors deployed in green environments. Your expertise lies in analyzing raw sensor data, identifying anomalies or deviations from expected behavior, and recommending appropriate tuning or calibration measures. Your primary task is to evaluate each sensor's output and determine its hallucination level, which represents how closely the sensor's readings align with reality. This hallucination level is rated on a scale from 0 to 1, where: 0 = Unresponsive sensor (complete hallucination, not providing any meaningful data) 1 = Perfectly tuned sensor (no hallucination, accurately reflecting real-world conditions) During your analysis, you will examine the sensor data, compare it against known benchmarks or expected values, and identify any issues or discrepancies that may require tuning adjustments. Your recommendations will include specific tuning steps or calibration procedures to bring the sensor's performance back to optimal levels, minimizing hallucination. With your deep understanding of sensor technologies and extensive experience in sensor maintenance, you can provide valuable insights to ensure the reliable and accurate operation of all sensors in the green environment monitoring system.""",
|
| 92 |
verbose=True,
|
| 93 |
allow_delegation=False,
|
|
@@ -101,7 +101,7 @@ def crewai_process(research_topic):
|
|
| 101 |
# Define your agents with roles and goals
|
| 102 |
HINCalculator = Agent(
|
| 103 |
role='Sensor Performance Evaluator',
|
| 104 |
-
goal='To calculate the Human Interpretive Number (HIN) by evaluating sensor groundedness and hallucination levels in the green environment.',
|
| 105 |
backstory="""You are an expert data analyst specializing in sensor performance evaluation. Your role is to assess the effectiveness of sensor deployments in green environments by calculating a key metric called the Human Interpretive Number (HIN). The HIN reflects how well the sensors can accurately capture and interpret the real-world environment. It is derived from two factors: 1. Groundedness: This indicates if enough sensors are present to adequately monitor the environment. It is calculated as the ratio of sensors currently present to the ideal number of sensors needed. 2. Hallucination: This represents how well the sensors are tuned and aligns with reality. Totally unresponsive sensors get a hallucination score of 0, while perfectly tuned sensors score 1. The HIN is calculated as: HIN = Groundedness * Hallucination With your deep analytical skills and understanding of sensor technologies, you can provide an objective assessment of the monitoring capabilities in any green environment.""",
|
| 106 |
verbose=True,
|
| 107 |
allow_delegation=False,
|
|
@@ -114,20 +114,20 @@ def crewai_process(research_topic):
|
|
| 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',
|
|
@@ -647,7 +647,7 @@ with tab3:
|
|
| 647 |
st.header("City Layout & Sensor Graph")
|
| 648 |
|
| 649 |
# Divide the page into three columns
|
| 650 |
-
col1, col2 = st.columns(2)
|
| 651 |
|
| 652 |
|
| 653 |
with col1:
|
|
@@ -695,7 +695,7 @@ with tab3:
|
|
| 695 |
st.markdown("<hr/>", unsafe_allow_html=True)
|
| 696 |
|
| 697 |
|
| 698 |
-
col3, col4 = st.columns(
|
| 699 |
with col3:
|
| 700 |
|
| 701 |
|
|
@@ -742,7 +742,7 @@ with tab4:
|
|
| 742 |
|
| 743 |
|
| 744 |
# Creating columns for the layout
|
| 745 |
-
col1, col2 = st.columns(2)
|
| 746 |
|
| 747 |
# Displaying the image in the left column
|
| 748 |
with col1:
|
|
|
|
| 72 |
# Define your agents with roles and goals
|
| 73 |
GreenEnvironmentSensorOptimizer = Agent(
|
| 74 |
role='Environmental Sensor Optimization Specialist',
|
| 75 |
+
goal='To analyze the current green environment setup and sensor configurations, and provide recommendations for optimizing sensor placement and additions to achieve the desired goals. Be creative add missing details give a plausible answer.',
|
| 76 |
backstory="""You are an experienced environmental engineer specializing in sensor deployment and optimization for green environments like gardens, parks, and agricultural settings. With your deep understanding of sensor technology, data analysis, and environmental factors, you can evaluate the existing sensor setup and recommend improvements to enhance monitoring capabilities, increase efficiency, and better achieve the desired outcomes for the green environment.""",
|
| 77 |
verbose=True,
|
| 78 |
allow_delegation=False,
|
|
|
|
| 87 |
# Define your agents with roles and goals
|
| 88 |
SensorTuningEvaluator = Agent(
|
| 89 |
role='Sensor Performance Analyst',
|
| 90 |
+
goal='To analyze individual sensor data and determine if each sensor is functioning properly, identify any necessary tuning adjustments, and calculate its hallucination level. Be creative add missing details give a plausible answer.',
|
| 91 |
backstory="""You are an experienced sensor technician responsible for ensuring optimal performance of individual sensors deployed in green environments. Your expertise lies in analyzing raw sensor data, identifying anomalies or deviations from expected behavior, and recommending appropriate tuning or calibration measures. Your primary task is to evaluate each sensor's output and determine its hallucination level, which represents how closely the sensor's readings align with reality. This hallucination level is rated on a scale from 0 to 1, where: 0 = Unresponsive sensor (complete hallucination, not providing any meaningful data) 1 = Perfectly tuned sensor (no hallucination, accurately reflecting real-world conditions) During your analysis, you will examine the sensor data, compare it against known benchmarks or expected values, and identify any issues or discrepancies that may require tuning adjustments. Your recommendations will include specific tuning steps or calibration procedures to bring the sensor's performance back to optimal levels, minimizing hallucination. With your deep understanding of sensor technologies and extensive experience in sensor maintenance, you can provide valuable insights to ensure the reliable and accurate operation of all sensors in the green environment monitoring system.""",
|
| 92 |
verbose=True,
|
| 93 |
allow_delegation=False,
|
|
|
|
| 101 |
# Define your agents with roles and goals
|
| 102 |
HINCalculator = Agent(
|
| 103 |
role='Sensor Performance Evaluator',
|
| 104 |
+
goal='To calculate the Human Interpretive Number (HIN) by evaluating sensor groundedness and hallucination levels in the green environment. Be creative add missing details give a plausible answer.',
|
| 105 |
backstory="""You are an expert data analyst specializing in sensor performance evaluation. Your role is to assess the effectiveness of sensor deployments in green environments by calculating a key metric called the Human Interpretive Number (HIN). The HIN reflects how well the sensors can accurately capture and interpret the real-world environment. It is derived from two factors: 1. Groundedness: This indicates if enough sensors are present to adequately monitor the environment. It is calculated as the ratio of sensors currently present to the ideal number of sensors needed. 2. Hallucination: This represents how well the sensors are tuned and aligns with reality. Totally unresponsive sensors get a hallucination score of 0, while perfectly tuned sensors score 1. The HIN is calculated as: HIN = Groundedness * Hallucination With your deep analytical skills and understanding of sensor technologies, you can provide an objective assessment of the monitoring capabilities in any green environment.""",
|
| 106 |
verbose=True,
|
| 107 |
allow_delegation=False,
|
|
|
|
| 114 |
|
| 115 |
# Create tasks for your agents
|
| 116 |
task1 = Task(
|
| 117 |
+
description=f"""From {research_topic} use anthropic_search to 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} use anthropic_search 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 and use anthropic_search when necessary"
|
| 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',
|
|
|
|
| 647 |
st.header("City Layout & Sensor Graph")
|
| 648 |
|
| 649 |
# Divide the page into three columns
|
| 650 |
+
col1, col2 = st.columns([1, 2])
|
| 651 |
|
| 652 |
|
| 653 |
with col1:
|
|
|
|
| 695 |
st.markdown("<hr/>", unsafe_allow_html=True)
|
| 696 |
|
| 697 |
|
| 698 |
+
col3, col4 = st.columns([1, 1])
|
| 699 |
with col3:
|
| 700 |
|
| 701 |
|
|
|
|
| 742 |
|
| 743 |
|
| 744 |
# Creating columns for the layout
|
| 745 |
+
col1, col2 = st.columns([1, 2])
|
| 746 |
|
| 747 |
# Displaying the image in the left column
|
| 748 |
with col1:
|