bgamazay commited on
Commit
8fa8434
·
verified ·
1 Parent(s): dd445b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -107,18 +107,14 @@ def compute_efficiency_ratio(df):
107
  return ratio
108
 
109
  def generate_info_callout(ratio, scope_text):
110
- """
111
- Returns a "did you know" callout with a lightbulb emoji.
112
- The callout uses a light green background, a small font, and is limited to a max-width of 250px.
113
- It is wrapped in a container that aligns it to the right.
114
- """
115
  return (
116
  f'<div style="text-align: right;">'
117
  f'<div class="info-callout" style="display:inline-block; max-width:250px; font-size:0.8em; background-color:#e6ffe6; padding:8px; border-radius:5px;">'
118
- f'💡 There\'s a <strong>{ratio:,.1f}x</strong> difference between the highest and lowest energy use in {scope_text}.'
119
  f'</div></div>'
120
  )
121
 
 
122
  def get_global_callout():
123
  all_df = pd.DataFrame()
124
  for task in tasks:
@@ -148,7 +144,7 @@ def get_zip_data_link():
148
  data = f.read()
149
  b64 = base64.b64encode(data).decode()
150
  href = (
151
- f'<a href="data:application/zip;base64,{b64}" '
152
  'download="data.zip" '
153
  'style="text-decoration: none; font-weight: bold; font-size: 1.1em; color: inherit; font-family: \'Inter\', sans-serif;">Download Data</a>'
154
  )
 
107
  return ratio
108
 
109
  def generate_info_callout(ratio, scope_text):
 
 
 
 
 
110
  return (
111
  f'<div style="text-align: right;">'
112
  f'<div class="info-callout" style="display:inline-block; max-width:250px; font-size:0.8em; background-color:#e6ffe6; padding:8px; border-radius:5px;">'
113
+ f'💡 There\'s a <strong style="color: white !important;">{ratio:,.1f}x</strong> difference between the highest and lowest energy use in {scope_text}.'
114
  f'</div></div>'
115
  )
116
 
117
+
118
  def get_global_callout():
119
  all_df = pd.DataFrame()
120
  for task in tasks:
 
144
  data = f.read()
145
  b64 = base64.b64encode(data).decode()
146
  href = (
147
+ f'<a class="header-link" href="data:application/zip;base64,{b64}" '
148
  'download="data.zip" '
149
  'style="text-decoration: none; font-weight: bold; font-size: 1.1em; color: inherit; font-family: \'Inter\', sans-serif;">Download Data</a>'
150
  )