rlasseri commited on
Commit
4c01e0e
1 Parent(s): 0333948

Update results.py

Browse files
Files changed (1) hide show
  1. results.py +4 -4
results.py CHANGED
@@ -28,7 +28,7 @@ def compare_info(tco1, tco2, dropdown, dropdown2):
28
  plt.figure(figsize=(6, 4))
29
  plt.bar(services, costs_to_compare, color=['red', 'green'])
30
  plt.xlabel('AI option services', fontsize=10)
31
- plt.ylabel('($) Cost/Request', fontsize=10)
32
  plt.title('Comparison of Cost/Request', fontsize=14)
33
 
34
  plt.tight_layout()
@@ -48,11 +48,11 @@ def create_table(tco1, tco2, labor_cost1, labor_cost2, dropdown, dropdown2, late
48
  list_values.append(first_sol)
49
  list_values.append(second_sol)
50
 
51
- data = pd.DataFrame(list_values, index=[dropdown, dropdown2], columns=["Cost/request ($) ", "Labor Cost ($/month)", "Average latency (s)"])
52
 
53
  formatted_data = data.copy()
54
- formatted_data["Cost/request ($) "] = formatted_data["Cost/request ($) "].apply('{:.5f}'.format)
55
- formatted_data["Labor Cost ($/month)"] = formatted_data["Labor Cost ($/month)"].apply('{:.0f}'.format)
56
 
57
  styled_data = formatted_data.style\
58
  .set_properties(**{'background-color': '#ffffff', 'color': '#000000', 'border-color': '#e0e0e0', 'border-width': '1px', 'border-style': 'solid'})\
 
28
  plt.figure(figsize=(6, 4))
29
  plt.bar(services, costs_to_compare, color=['red', 'green'])
30
  plt.xlabel('AI option services', fontsize=10)
31
+ plt.ylabel('() Cost/Request', fontsize=10)
32
  plt.title('Comparison of Cost/Request', fontsize=14)
33
 
34
  plt.tight_layout()
 
48
  list_values.append(first_sol)
49
  list_values.append(second_sol)
50
 
51
+ data = pd.DataFrame(list_values, index=[dropdown, dropdown2], columns=["Cost/request () ", "Labor Cost (€/month)", "Average latency (s)"])
52
 
53
  formatted_data = data.copy()
54
+ formatted_data["Cost/request () "] = formatted_data["Cost/request () "].apply('{:.5f}'.format)
55
+ formatted_data["Labor Cost (€/month)"] = formatted_data["Labor Cost (€/month)"].apply('{:.0f}'.format)
56
 
57
  styled_data = formatted_data.style\
58
  .set_properties(**{'background-color': '#ffffff', 'color': '#000000', 'border-color': '#e0e0e0', 'border-width': '1px', 'border-style': 'solid'})\