Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,27 +38,17 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 38 |
def evaluate_hydraulic_aggregate(dp: float, dh: float, dt: float, P_in: float, n: float,
|
| 39 |
E_dp: float, E_dh: float, E_dt: float, E_P_in: float, E_n: float) -> str:
|
| 40 |
"""Evaluates a hydraulic aggregate measurement based on given parameters.
|
| 41 |
-
|
| 42 |
-
This tool calculates key performance indicators such as:
|
| 43 |
-
- Volumetric efficiency
|
| 44 |
-
- Volume flow rate
|
| 45 |
-
- Useful power output
|
| 46 |
-
- Total efficiency
|
| 47 |
-
It also determines the associated measurement errors using error propagation formulas.
|
| 48 |
-
|
| 49 |
-
This function is specifically designed for hydraulic aggregate measurements.
|
| 50 |
-
|
| 51 |
Args:
|
| 52 |
-
dp
|
| 53 |
-
dh
|
| 54 |
-
dt
|
| 55 |
-
P_in
|
| 56 |
-
n
|
| 57 |
-
E_dp
|
| 58 |
-
E_dh
|
| 59 |
-
E_dt
|
| 60 |
-
E_P_in
|
| 61 |
-
E_n
|
| 62 |
|
| 63 |
Returns:
|
| 64 |
str: A formatted summary of the computed performance metrics and associated absolute errors.
|
|
@@ -115,7 +105,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 115 |
|
| 116 |
agent = CodeAgent(
|
| 117 |
model=model,
|
| 118 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 119 |
max_steps=6,
|
| 120 |
verbosity_level=1,
|
| 121 |
grammar=None,
|
|
|
|
| 38 |
def evaluate_hydraulic_aggregate(dp: float, dh: float, dt: float, P_in: float, n: float,
|
| 39 |
E_dp: float, E_dh: float, E_dt: float, E_P_in: float, E_n: float) -> str:
|
| 40 |
"""Evaluates a hydraulic aggregate measurement based on given parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
Args:
|
| 42 |
+
dp: Pressure difference in bar.
|
| 43 |
+
dh: Height difference in mm.
|
| 44 |
+
dt: Time difference in seconds.
|
| 45 |
+
P_in: Input power in kW.
|
| 46 |
+
n: Rotational speed in RPM.
|
| 47 |
+
E_dp: Error in pressure measurement.
|
| 48 |
+
E_dh: Error in height measurement.
|
| 49 |
+
E_dt: Error in time measurement.
|
| 50 |
+
E_P_in: Error in input power measurement.
|
| 51 |
+
E_n: Error in rotational speed measurement.
|
| 52 |
|
| 53 |
Returns:
|
| 54 |
str: A formatted summary of the computed performance metrics and associated absolute errors.
|
|
|
|
| 105 |
|
| 106 |
agent = CodeAgent(
|
| 107 |
model=model,
|
| 108 |
+
tools=[evaluate_hydraulic_aggregate,final_answer], ## add your tools here (don't remove final answer)
|
| 109 |
max_steps=6,
|
| 110 |
verbosity_level=1,
|
| 111 |
grammar=None,
|