xianbao HF staff commited on
Commit
33b65c3
1 Parent(s): 93857fb

Upload folder using huggingface_hub (#4)

Browse files

- Upload folder using huggingface_hub (640d8df6146a70f9e07901279c703773cfa2c2eb)

Files changed (2) hide show
  1. src/pages/index.tsx +16 -15
  2. upload.sh +1 -0
src/pages/index.tsx CHANGED
@@ -21,15 +21,16 @@ interface Activity {
21
  export default function Home() {
22
  const [calendarData, setCalendarData] = useState<Record<string, Activity[]>>({});
23
  const [isLoading, setIsLoading] = useState(true);
24
-
25
  const PROVIDERS_MAP: Record<string, { color: string; authors: string[] }> = {
26
- "BAAI": { color: "#ff7000", authors: ["BAAI"] }, // Vibrant Orange
27
- "DeepSeek": { color: "#007ACC", authors: ["deepseek-ai"] }, // Light Blue
28
  "Shanghai AI Lab": { color: "#10A37F", authors: ["internlm", "OpenGVLab", "openmmlab"] }, // Fresh Green
29
- "Alibaba": { color: "#D2691E", authors: ["Qwen", "Alibaba-NLP", "alibaba-pai", "DAMO-NLP-SG"] }, // Chocolate
30
  "GLM": { color: "#4285F4", authors: ["THUDM"] }, // Classic Blue
31
  "Tencent": { color: "#1DA1F2", authors: ["TencentARC", "Tencent-Hunyuan"] }, // Twitter Blue
32
  "Yi/01": { color: "#FF4500", authors: ["01-ai"] }, // Orange-Red
 
33
  }
34
 
35
  const generateCalendarData = (modelData: ModelData[]) => {
@@ -45,13 +46,13 @@ export default function Home() {
45
  // generate daily data for each provider
46
  for (let d = new Date(startDate); d <= today; d.setDate(d.getDate() + 1)) {
47
  const dateString = d.toISOString().split('T')[0];
48
-
49
  Object.entries(PROVIDERS_MAP).forEach(([provider, { authors }]) => {
50
- const count = modelData.filter(item =>
51
- item.createdAt.startsWith(dateString) &&
52
  authors.some(author => item.id.startsWith(author))
53
  ).length;
54
-
55
  data[provider].push({ date: dateString, count, level: 0 });
56
  });
57
  }
@@ -68,11 +69,11 @@ export default function Home() {
68
  Object.entries(data).forEach(([provider, days]) => {
69
  const avgCount = avgCounts[provider];
70
  days.forEach(day => {
71
- day.level =
72
  day.count === 0 ? 0 :
73
- day.count <= avgCount * 0.5 ? 1 :
74
- day.count <= avgCount ? 2 :
75
- day.count <= avgCount * 1.5 ? 3 : 4;
76
  });
77
  });
78
 
@@ -120,20 +121,20 @@ export default function Home() {
120
  ) : (
121
  <>
122
  {Object.entries(PROVIDERS_MAP)
123
- .sort(([keyA], [keyB]) =>
124
  calendarData[keyB].reduce((sum, day) => sum + day.count, 0) -
125
  calendarData[keyA].reduce((sum, day) => sum + day.count, 0)
126
  )
127
  .map(([providerName, { color }]) => (
128
  <div key={providerName} className="mb-8">
129
  <h2 className="text-2xl font-bold mb-2">{providerName}</h2>
130
- <ActivityCalendar
131
  data={calendarData[providerName]}
132
  theme={{
133
  dark: ['#161b22', color],
 
134
  }}
135
  hideTotalCount
136
- colorScheme="dark"
137
  renderBlock={(block, activity) => (
138
  <MuiTooltip
139
  title={`${activity.count} models created on ${activity.date}`}
 
21
  export default function Home() {
22
  const [calendarData, setCalendarData] = useState<Record<string, Activity[]>>({});
23
  const [isLoading, setIsLoading] = useState(true);
24
+
25
  const PROVIDERS_MAP: Record<string, { color: string; authors: string[] }> = {
26
+ "BAAI": { color: "#FF7000", authors: ["BAAI"] }, // Vibrant Orange
27
+ "DeepSeek": { color: "#1877F2", authors: ["deepseek-ai"] }, // Meta's Blue
28
  "Shanghai AI Lab": { color: "#10A37F", authors: ["internlm", "OpenGVLab", "openmmlab"] }, // Fresh Green
29
+ "Alibaba": { color: "#FF6F00", authors: ["Qwen", "Alibaba-NLP", "alibaba-pai", "DAMO-NLP-SG"] }, // Bright Orange
30
  "GLM": { color: "#4285F4", authors: ["THUDM"] }, // Classic Blue
31
  "Tencent": { color: "#1DA1F2", authors: ["TencentARC", "Tencent-Hunyuan"] }, // Twitter Blue
32
  "Yi/01": { color: "#FF4500", authors: ["01-ai"] }, // Orange-Red
33
+ "Multimodal Art Projection (m-a-p)": { color: "#5E35B1", authors: ["m-a-p"] } // Dark Purple, with gradient from Very Light Purple to Dark Purple
34
  }
35
 
36
  const generateCalendarData = (modelData: ModelData[]) => {
 
46
  // generate daily data for each provider
47
  for (let d = new Date(startDate); d <= today; d.setDate(d.getDate() + 1)) {
48
  const dateString = d.toISOString().split('T')[0];
49
+
50
  Object.entries(PROVIDERS_MAP).forEach(([provider, { authors }]) => {
51
+ const count = modelData.filter(item =>
52
+ item.createdAt.startsWith(dateString) &&
53
  authors.some(author => item.id.startsWith(author))
54
  ).length;
55
+
56
  data[provider].push({ date: dateString, count, level: 0 });
57
  });
58
  }
 
69
  Object.entries(data).forEach(([provider, days]) => {
70
  const avgCount = avgCounts[provider];
71
  days.forEach(day => {
72
+ day.level =
73
  day.count === 0 ? 0 :
74
+ day.count <= avgCount * 0.5 ? 1 :
75
+ day.count <= avgCount ? 2 :
76
+ day.count <= avgCount * 1.5 ? 3 : 4;
77
  });
78
  });
79
 
 
121
  ) : (
122
  <>
123
  {Object.entries(PROVIDERS_MAP)
124
+ .sort(([keyA], [keyB]) =>
125
  calendarData[keyB].reduce((sum, day) => sum + day.count, 0) -
126
  calendarData[keyA].reduce((sum, day) => sum + day.count, 0)
127
  )
128
  .map(([providerName, { color }]) => (
129
  <div key={providerName} className="mb-8">
130
  <h2 className="text-2xl font-bold mb-2">{providerName}</h2>
131
+ <ActivityCalendar
132
  data={calendarData[providerName]}
133
  theme={{
134
  dark: ['#161b22', color],
135
+ light: ['#e0e0e0', color],
136
  }}
137
  hideTotalCount
 
138
  renderBlock={(block, activity) => (
139
  <MuiTooltip
140
  title={`${activity.count} models created on ${activity.date}`}
upload.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli upload zh-ai-community/zh-model-release-heatmap . . --repo-type space --create-pr