timqian commited on
Commit
888a56b
1 Parent(s): 362fadb

update chart

Browse files
asset-manifest.json CHANGED
@@ -1,15 +1,15 @@
1
  {
2
  "files": {
3
  "main.css": "/static/css/main.1e103507.css",
4
- "main.js": "/static/js/main.6c20428f.js",
5
  "static/js/787.0bfccc2a.chunk.js": "/static/js/787.0bfccc2a.chunk.js",
6
  "index.html": "/index.html",
7
  "main.1e103507.css.map": "/static/css/main.1e103507.css.map",
8
- "main.6c20428f.js.map": "/static/js/main.6c20428f.js.map",
9
  "787.0bfccc2a.chunk.js.map": "/static/js/787.0bfccc2a.chunk.js.map"
10
  },
11
  "entrypoints": [
12
  "static/css/main.1e103507.css",
13
- "static/js/main.6c20428f.js"
14
  ]
15
  }
 
1
  {
2
  "files": {
3
  "main.css": "/static/css/main.1e103507.css",
4
+ "main.js": "/static/js/main.abd1a1d4.js",
5
  "static/js/787.0bfccc2a.chunk.js": "/static/js/787.0bfccc2a.chunk.js",
6
  "index.html": "/index.html",
7
  "main.1e103507.css.map": "/static/css/main.1e103507.css.map",
8
+ "main.abd1a1d4.js.map": "/static/js/main.abd1a1d4.js.map",
9
  "787.0bfccc2a.chunk.js.map": "/static/js/787.0bfccc2a.chunk.js.map"
10
  },
11
  "entrypoints": [
12
  "static/css/main.1e103507.css",
13
+ "static/js/main.abd1a1d4.js"
14
  ]
15
  }
index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="View the like history of a project on huggingface"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Like History</title><script defer="defer" src="/static/js/main.6c20428f.js"></script><link href="/static/css/main.1e103507.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
 
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="View the like history of a project on huggingface"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Like History</title><script defer="defer" src="/static/js/main.abd1a1d4.js"></script><link href="/static/css/main.1e103507.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
src/App.js CHANGED
@@ -13,7 +13,7 @@ function transformLikesData(likesData) {
13
 
14
  // Step 3
15
  likesData.forEach(like => {
16
- const date = like.likedAt.split('T')[0];
17
  cumulativeCount++;
18
  cumulativeLikes[date] = cumulativeCount;
19
  });
@@ -35,7 +35,7 @@ function transformLikesData(likesData) {
35
  */
36
  function App() {
37
  const [projectType, setProjectType] = useState("models");
38
- const [projectName, setProjectName] = useState("openai/whisper-large-v3");
39
 
40
  const onSubmit = async () => {
41
  const svg = document.querySelector('.line-chart')
@@ -51,11 +51,11 @@ function App() {
51
 
52
  let likeHistory = transformLikesData(likers)
53
 
54
-
55
  if (likeHistory.length > 40) {
56
  // sample 20 points
57
  const sampledLikeHistory = []
58
- const step = Math.floor(likeHistory.length / 40)
59
  for (let i = 0; i < likeHistory.length; i += step) {
60
  sampledLikeHistory.push(likeHistory[i])
61
  }
@@ -121,7 +121,7 @@ function App() {
121
  name="phone-number"
122
  id="phone-number"
123
  className="block w-full rounded-md border-0 py-1.5 pl-24 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
124
- placeholder="openai/whisper-large-v3"
125
  value={projectName}
126
  onChange={(e) => setProjectName(e.target.value)}
127
  onFocus={(e) => e.target.select()}
 
13
 
14
  // Step 3
15
  likesData.forEach(like => {
16
+ const date = like.likedAt
17
  cumulativeCount++;
18
  cumulativeLikes[date] = cumulativeCount;
19
  });
 
35
  */
36
  function App() {
37
  const [projectType, setProjectType] = useState("models");
38
+ const [projectName, setProjectName] = useState("openai/whisper-large");
39
 
40
  const onSubmit = async () => {
41
  const svg = document.querySelector('.line-chart')
 
51
 
52
  let likeHistory = transformLikesData(likers)
53
 
54
+ console.log(likeHistory)
55
  if (likeHistory.length > 40) {
56
  // sample 20 points
57
  const sampledLikeHistory = []
58
+ const step = Math.floor(likeHistory.length / 20)
59
  for (let i = 0; i < likeHistory.length; i += step) {
60
  sampledLikeHistory.push(likeHistory[i])
61
  }
 
121
  name="phone-number"
122
  id="phone-number"
123
  className="block w-full rounded-md border-0 py-1.5 pl-24 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
124
+ placeholder="openai/whisper-large"
125
  value={projectName}
126
  onChange={(e) => setProjectName(e.target.value)}
127
  onFocus={(e) => e.target.select()}
static/js/main.abd1a1d4.js ADDED
The diff for this file is too large to render. See raw diff
 
static/js/main.abd1a1d4.js.LICENSE.txt ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
2
+
3
+ /**
4
+ * @license React
5
+ * react-dom.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+
13
+ /**
14
+ * @license React
15
+ * react-jsx-runtime.production.min.js
16
+ *
17
+ * Copyright (c) Facebook, Inc. and its affiliates.
18
+ *
19
+ * This source code is licensed under the MIT license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+
23
+ /**
24
+ * @license React
25
+ * react.production.min.js
26
+ *
27
+ * Copyright (c) Facebook, Inc. and its affiliates.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE file in the root directory of this source tree.
31
+ */
32
+
33
+ /**
34
+ * @license React
35
+ * scheduler.production.min.js
36
+ *
37
+ * Copyright (c) Facebook, Inc. and its affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */
static/js/main.abd1a1d4.js.map ADDED
The diff for this file is too large to render. See raw diff