jsulz HF staff commited on
Commit
a57b3d3
1 Parent(s): 746dd34

wiring in poetry for local dev and making the charts dark mode

Browse files
Files changed (4) hide show
  1. .gitignore +2 -0
  2. app.py +11 -1
  3. poetry.lock +0 -0
  4. pyproject.toml +19 -0
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # ignore pycache
2
+ __pycache__/
app.py CHANGED
@@ -1,6 +1,11 @@
1
  import gradio as gr
2
  import pandas as pd
3
  from plotly import graph_objects as go
 
 
 
 
 
4
 
5
 
6
  def process_dataset():
@@ -122,7 +127,11 @@ def cumulative_growth_plot_analysis(df, df_compressed):
122
  fig = go.Figure()
123
 
124
  # Define a color map for each type
125
- color_map = {"model": "blue", "space": "green", "dataset": "red"}
 
 
 
 
126
 
127
  # Add a scatter trace for each type
128
  for column in cumulative_df.columns:
@@ -182,6 +191,7 @@ def plot_total_sum(by_type_arr):
182
  xaxis_title="File Extension",
183
  yaxis_title="Total Size (PBs)",
184
  yaxis=dict(tickformat=".2f"), # Format y-axis labels to 2 decimal places
 
185
  )
186
  return fig
187
 
 
1
  import gradio as gr
2
  import pandas as pd
3
  from plotly import graph_objects as go
4
+ import plotly.io as pio
5
+ import plotly.express as px
6
+
7
+ # Set the default theme to "plotly_dark"
8
+ pio.templates.default = "plotly_dark"
9
 
10
 
11
  def process_dataset():
 
127
  fig = go.Figure()
128
 
129
  # Define a color map for each type
130
+ color_map = {
131
+ "model": px.colors.qualitative.Alphabet[3],
132
+ "space": px.colors.qualitative.Alphabet[2],
133
+ "dataset": px.colors.qualitative.Alphabet[9],
134
+ }
135
 
136
  # Add a scatter trace for each type
137
  for column in cumulative_df.columns:
 
191
  xaxis_title="File Extension",
192
  yaxis_title="Total Size (PBs)",
193
  yaxis=dict(tickformat=".2f"), # Format y-axis labels to 2 decimal places
194
+ colorway=px.colors.qualitative.Alphabet, # Use Plotly color palette
195
  )
196
  return fig
197
 
poetry.lock ADDED
The diff for this file is too large to render. See raw diff
 
pyproject.toml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [tool.poetry]
2
+ name = "lfs-analysis"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = ["jsulz <[email protected]>"]
6
+ license = "MIT"
7
+ readme = "README.md"
8
+
9
+ [tool.poetry.dependencies]
10
+ python = "^3.12"
11
+ gradio = "^4.44.0"
12
+ pandas = "^2.2.3"
13
+ plotly = "^5.24.1"
14
+ pyarrow = "^17.0.0"
15
+
16
+
17
+ [build-system]
18
+ requires = ["poetry-core"]
19
+ build-backend = "poetry.core.masonry.api"