Erik commited on
Commit
73a535b
·
verified ·
1 Parent(s): a32e5ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -4,7 +4,6 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
- from termcolor import colored
8
 
9
  from Gradio_UI import GradioUI
10
 
@@ -21,13 +20,13 @@ def compare_degrees(current_weather:float, optimal_fermentation_degrees:float)->
21
  dif_degrees = current_weather-optimal_fermentation_degrees
22
  if abs(dif_degrees) >= 1.5:
23
  if dif_degrees<0:
24
- return colored(f"RED LIGHT - the difference degrees between optimal and current weather are {dif_degrees}ºC - YOU SHOULD INCREASE THE HEATER BY {dif_degrees}ºC!", 'red')
25
  else:
26
- return colored(f"RED LIGHT - the difference degrees between optimal and current weather are {dif_degrees}ºC - YOU SHOULD DECREASE THE HEATER BY {dif_degrees}ºC!", 'red')
27
  else:
28
- return colored(f"GREEN LIGHT - the difference degrees between optimal and current weather are {dif_degrees} - which is in range!", 'green')
29
  except Exception as e:
30
- return colored(f"Error fetching {str(current_weather)} and {str(optimal_fermentation_degrees)}.", 'yellow')
31
 
32
 
33
  @tool
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
 
7
 
8
  from Gradio_UI import GradioUI
9
 
 
20
  dif_degrees = current_weather-optimal_fermentation_degrees
21
  if abs(dif_degrees) >= 1.5:
22
  if dif_degrees<0:
23
+ return f"RED LIGHT - the difference degrees between optimal and current weather are {dif_degrees}ºC - YOU SHOULD INCREASE THE HEATER BY {dif_degrees}ºC!"
24
  else:
25
+ return f"RED LIGHT - the difference degrees between optimal and current weather are {dif_degrees}ºC - YOU SHOULD DECREASE THE HEATER BY {dif_degrees}ºC!"
26
  else:
27
+ return f"GREEN LIGHT - the difference degrees between optimal and current weather are {dif_degrees} - which is in range!"
28
  except Exception as e:
29
+ return f"Error fetching {str(current_weather)} and {str(optimal_fermentation_degrees)}."
30
 
31
 
32
  @tool