Spaces:
Runtime error
Runtime error
Commit
·
f03fc12
1
Parent(s):
2750673
add pies and query for model downloads by library
Browse files- pages/index.md +62 -15
pages/index.md
CHANGED
@@ -105,27 +105,74 @@ WHERE repo = 'space'
|
|
105 |
|
106 |
```sql model_pipeline_downloads
|
107 |
SELECT
|
108 |
-
|
109 |
FROM read_parquet('https://huggingface.co/datasets/cfahlgren1/hub-stats/resolve/refs%2Fconvert%2Fparquet/models/train/0000.parquet?download=true')
|
110 |
-
|
111 |
-
|
112 |
```
|
113 |
|
114 |
-
<BarChart
|
115 |
-
data={model_pipeline_downloads}
|
116 |
-
x=pipeline_tag
|
117 |
-
y=total_downloads
|
118 |
-
yAxisTitle="Downloads Last 30 Days"
|
119 |
-
xAxisTitle="Pipeline Tag"
|
120 |
-
sort=true
|
121 |
-
fillColor="#cf0d06"
|
122 |
-
strokeColor="#eb5752"
|
123 |
-
/>
|
124 |
<DataTable data={model_pipeline_downloads} search=true>
|
125 |
-
<Column id="
|
126 |
-
<Column id="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
</DataTable>
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
# Model Licenses
|
130 |
|
131 |
```sql model_license_ratio
|
|
|
105 |
|
106 |
```sql model_pipeline_downloads
|
107 |
SELECT
|
108 |
+
pipeline_tag AS name, SUM(downloads) AS value
|
109 |
FROM read_parquet('https://huggingface.co/datasets/cfahlgren1/hub-stats/resolve/refs%2Fconvert%2Fparquet/models/train/0000.parquet?download=true')
|
110 |
+
GROUP BY pipeline_tag
|
111 |
+
ORDER BY value DESC;
|
112 |
```
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
<DataTable data={model_pipeline_downloads} search=true>
|
115 |
+
<Column id="name" title="Pipeline Tag" />
|
116 |
+
<Column id="value" title="Downloads Last 30 Days" fmt='#,##0.00,,"M"' />
|
117 |
+
</DataTable>
|
118 |
+
|
119 |
+
|
120 |
+
<ECharts config={
|
121 |
+
{
|
122 |
+
tooltip: {
|
123 |
+
formatter: '{b}: {c} ({d}%)'
|
124 |
+
},
|
125 |
+
series: [
|
126 |
+
{
|
127 |
+
type: 'pie',
|
128 |
+
radius: ['40%', '70%'],
|
129 |
+
data: [...model_pipeline_downloads],
|
130 |
+
label: {
|
131 |
+
show: true,
|
132 |
+
formatter: '{b}: {c}'
|
133 |
+
}
|
134 |
+
}
|
135 |
+
]
|
136 |
+
}
|
137 |
+
}
|
138 |
+
/>
|
139 |
+
|
140 |
+
# Model Downloads by Library (Last 30 days)
|
141 |
+
|
142 |
+
```sql model_library_downloads
|
143 |
+
SELECT
|
144 |
+
library_name AS name, SUM(downloads) AS value
|
145 |
+
FROM read_parquet('https://huggingface.co/datasets/cfahlgren1/hub-stats/resolve/refs%2Fconvert%2Fparquet/models/train/0000.parquet?download=true')
|
146 |
+
GROUP BY library_name
|
147 |
+
ORDER BY value DESC;
|
148 |
+
```
|
149 |
+
|
150 |
+
<DataTable data={model_library_downloads} search=true>
|
151 |
+
<Column id="name" title="Library" />
|
152 |
+
<Column id="value" title="Downloads Last 30 Days" fmt='#,##0.00,,"M"' />
|
153 |
</DataTable>
|
154 |
|
155 |
+
|
156 |
+
<ECharts config={
|
157 |
+
{
|
158 |
+
tooltip: {
|
159 |
+
formatter: '{b}: {c} ({d}%)'
|
160 |
+
},
|
161 |
+
series: [
|
162 |
+
{
|
163 |
+
type: 'pie',
|
164 |
+
radius: ['40%', '70%'],
|
165 |
+
data: [...model_library_downloads],
|
166 |
+
label: {
|
167 |
+
show: true,
|
168 |
+
formatter: '{b}: {c}'
|
169 |
+
}
|
170 |
+
}
|
171 |
+
]
|
172 |
+
}
|
173 |
+
}
|
174 |
+
/>
|
175 |
+
|
176 |
# Model Licenses
|
177 |
|
178 |
```sql model_license_ratio
|