jadehardouin commited on
Commit
bec7fe8
1 Parent(s): ecaa1ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -3
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  import models
3
  import pandas as pd
4
  from gradio.themes.base import Base
 
5
  from gradio.themes.utils import colors, fonts, sizes
6
  from typing import Iterable
7
 
@@ -47,13 +48,28 @@ def update_plot(tco1, tco2, dropdown, dropdown2, labour_cost1, labour_cost2):
47
  )
48
  return gr.LinePlot.update(data, x="Number of requests", y="Cost ($)",color="AI model service",color_legend_position="bottom", title="Total Cost of Model Serving for one month", height=300, width=500, tooltip=["Number of requests", "Cost ($)", "AI model service"])
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  class Style(Base):
51
  def __init__(
52
  self,
53
  *,
54
- primary_hue: colors.Color | str = colors.neutral,
55
- secondary_hue: colors.Color | str = colors.neutral,
56
- neutral_hue: colors.Color | str = colors.neutral,
57
  spacing_size: sizes.Size | str = sizes.spacing_md,
58
  radius_size: sizes.Size | str = sizes.radius_md,
59
  text_size: sizes.Size | str = sizes.text_md,
 
2
  import models
3
  import pandas as pd
4
  from gradio.themes.base import Base
5
+ from gradio.themes.utils.colors import Color
6
  from gradio.themes.utils import colors, fonts, sizes
7
  from typing import Iterable
8
 
 
48
  )
49
  return gr.LinePlot.update(data, x="Number of requests", y="Cost ($)",color="AI model service",color_legend_position="bottom", title="Total Cost of Model Serving for one month", height=300, width=500, tooltip=["Number of requests", "Cost ($)", "AI model service"])
50
 
51
+ light_grey = Color(
52
+ name="light_grey",
53
+ c50="#e0e0e0",
54
+ c100="#e0e0e0",
55
+ c200="#e0e0e0",
56
+ c300="#e0e0e0",
57
+ c400="#e0e0e0",
58
+ c500="#e0e0e0",
59
+ c600="#e0e0e0",
60
+ c700="#e0e0e0",
61
+ c800="#e0e0e0",
62
+ c900="#e0e0e0",
63
+ c950="#e0e0e0",
64
+ )
65
+
66
  class Style(Base):
67
  def __init__(
68
  self,
69
  *,
70
+ primary_hue: colors.Color | str = light_grey,
71
+ secondary_hue: colors.Color | str = light_grey,
72
+ neutral_hue: colors.Color | str = light_grey,
73
  spacing_size: sizes.Size | str = sizes.spacing_md,
74
  radius_size: sizes.Size | str = sizes.radius_md,
75
  text_size: sizes.Size | str = sizes.text_md,