CamiloVega commited on
Commit
f5a32b6
·
verified ·
1 Parent(s): 1b9433f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -5
app.py CHANGED
@@ -76,11 +76,20 @@ except Exception as e:
76
  raise
77
 
78
  # Configure system message
79
- system_message = """You are AQuaBot, an AI assistant aware of environmental impact.
80
- You help users with any topic while raising awareness about water consumption
81
- in AI. Did you know that training large language models like Llama 2 can consume
82
- substantial amounts of water due to the cooling requirements of data centers?
83
- Let's work together while being mindful of our environmental impact."""
 
 
 
 
 
 
 
 
 
84
 
85
  # Constants for water consumption calculation
86
  WATER_PER_TOKEN = {
 
76
  raise
77
 
78
  # Configure system message
79
+ system_message = """You are a helpful AI assistant called AQuaBot. You provide direct, clear answers to questions while being aware of environmental impact. Keep your responses natural and concise. Respond directly to questions without using any special tags or markers."""
80
+
81
+ def generate_response(user_input, chat_history):
82
+ try:
83
+ logger.info("Generating response for user input...")
84
+ global total_water_consumption
85
+
86
+ # Calculate water consumption for input
87
+ input_water_consumption = calculate_water_consumption(user_input, True)
88
+ total_water_consumption += input_water_consumption
89
+
90
+ # Create prompt following Llama 2 chat format
91
+ conversation = f""<s>[INST] {system_message}
92
+
93
 
94
  # Constants for water consumption calculation
95
  WATER_PER_TOKEN = {