Spaces:
Sleeping
Sleeping
Commit
·
934d8c3
1
Parent(s):
1e6e2b3
fixed intro and description
Browse files- README.md +1 -1
- config.json +3 -3
- css/style.css +12 -0
- index.html +27 -4
- js/main.js +5 -4
- js/paper-atlas.js +5 -2
README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Daily Papers Atlas
|
2 |
|
3 |
The atlas visualization demo of the daily papers listed in [Hugging Face Daily Papers](https://huggingface.co/papers).
|
4 |
|
|
|
1 |
+
# 🤗 Daily Papers Atlas
|
2 |
|
3 |
The atlas visualization demo of the daily papers listed in [Hugging Face Daily Papers](https://huggingface.co/papers).
|
4 |
|
config.json
CHANGED
@@ -5,12 +5,12 @@
|
|
5 |
"logo": {
|
6 |
"file": "",
|
7 |
"link": "",
|
8 |
-
"text": "Daily
|
9 |
},
|
10 |
"text": {
|
11 |
"more": "<p><strong>About:</strong> This visualization represents a network of research papers and authors, showing connections and relationships between them. The network is based on the graph.graphml file and converted to a format suitable for web visualization.</p>",
|
12 |
-
"intro": "A
|
13 |
-
"title": "Daily
|
14 |
},
|
15 |
"legend": {
|
16 |
"edgeLabel": "Connection",
|
|
|
5 |
"logo": {
|
6 |
"file": "",
|
7 |
"link": "",
|
8 |
+
"text": "🤗 Daily Papers Atlas"
|
9 |
},
|
10 |
"text": {
|
11 |
"more": "<p><strong>About:</strong> This visualization represents a network of research papers and authors, showing connections and relationships between them. The network is based on the graph.graphml file and converted to a format suitable for web visualization.</p>",
|
12 |
+
"intro": "A demo network of the top research papers in Machine Learning featured in <a href='https://huggingface.co/papers' target='_blank'>Hugging Face Daily Papers</a>.<br>The full report and project: <a href='https://github.com/hesamsheikh/daily-papers-analysis' target='_blank'>GitHub</a>",
|
13 |
+
"title": "🤗 Daily Papers Atlas"
|
14 |
},
|
15 |
"legend": {
|
16 |
"edgeLabel": "Connection",
|
css/style.css
CHANGED
@@ -265,6 +265,18 @@ canvas#sigma_bg_1 {
|
|
265 |
#titletext {
|
266 |
margin-bottom: 20px;
|
267 |
line-height: 1.5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
269 |
|
270 |
.info {
|
|
|
265 |
#titletext {
|
266 |
margin-bottom: 20px;
|
267 |
line-height: 1.5;
|
268 |
+
display: block;
|
269 |
+
width: 100%;
|
270 |
+
}
|
271 |
+
|
272 |
+
#titletext a {
|
273 |
+
color: #007AFF;
|
274 |
+
text-decoration: underline;
|
275 |
+
cursor: pointer;
|
276 |
+
}
|
277 |
+
|
278 |
+
#titletext a:hover {
|
279 |
+
text-decoration: none;
|
280 |
}
|
281 |
|
282 |
.info {
|
index.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" itemscope itemtype="http://schema.org/Map">
|
3 |
|
4 |
<head>
|
5 |
-
<title
|
6 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
7 |
<meta charset="utf-8">
|
8 |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=no" />
|
@@ -39,8 +39,8 @@
|
|
39 |
</div>
|
40 |
<div id="mainpanel">
|
41 |
<div class="col">
|
42 |
-
<div id="title"
|
43 |
-
<div id="titletext">A
|
44 |
</div>
|
45 |
|
46 |
<div class="col">
|
@@ -70,7 +70,7 @@
|
|
70 |
|
71 |
<div class="col footer">
|
72 |
<div class="credits">
|
73 |
-
|
74 |
</div>
|
75 |
</div>
|
76 |
</div>
|
@@ -95,5 +95,28 @@
|
|
95 |
<div class="z" rel="out"></div>
|
96 |
<div class="z" rel="center"></div>
|
97 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
</body>
|
99 |
</html>
|
|
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" itemscope itemtype="http://schema.org/Map">
|
3 |
|
4 |
<head>
|
5 |
+
<title>🤗 Daily Papers Atlas</title>
|
6 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
7 |
<meta charset="utf-8">
|
8 |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=no" />
|
|
|
39 |
</div>
|
40 |
<div id="mainpanel">
|
41 |
<div class="col">
|
42 |
+
<div id="title">🤗 Daily Papers Atlas</div>
|
43 |
+
<div id="titletext">A demo network of the top research papers in Machine Learning featured in <a href='https://huggingface.co/papers' target='_blank'>Hugging Face Daily Papers</a>.<br>Report and Project: <a href='https://github.com/hesamsheikh/daily-papers-analysis' target='_blank'>GitHub</a></div>
|
44 |
</div>
|
45 |
|
46 |
<div class="col">
|
|
|
70 |
|
71 |
<div class="col footer">
|
72 |
<div class="credits">
|
73 |
+
Graph visualization by <a href="https://gephi.org/" target="_blank">Gephi</a> and rendered for web by <a href="https://sigmajs.org/" target="_blank">SigmaJS</a>..
|
74 |
</div>
|
75 |
</div>
|
76 |
</div>
|
|
|
95 |
<div class="z" rel="out"></div>
|
96 |
<div class="z" rel="center"></div>
|
97 |
</div>
|
98 |
+
|
99 |
+
<!-- Script to protect the intro text from being modified by any scripts -->
|
100 |
+
<script type="text/javascript">
|
101 |
+
// Get the original content that we want to preserve
|
102 |
+
const originalIntroHTML = document.getElementById('titletext').innerHTML;
|
103 |
+
|
104 |
+
// Create a MutationObserver to detect any changes to the element
|
105 |
+
const observer = new MutationObserver(function(mutations) {
|
106 |
+
mutations.forEach(function() {
|
107 |
+
// If the content has changed, restore it
|
108 |
+
if (document.getElementById('titletext').innerHTML !== originalIntroHTML) {
|
109 |
+
document.getElementById('titletext').innerHTML = originalIntroHTML;
|
110 |
+
}
|
111 |
+
});
|
112 |
+
});
|
113 |
+
|
114 |
+
// Start observing the title text element
|
115 |
+
observer.observe(document.getElementById('titletext'), {
|
116 |
+
childList: true,
|
117 |
+
characterData: true,
|
118 |
+
subtree: true
|
119 |
+
});
|
120 |
+
</script>
|
121 |
</body>
|
122 |
</html>
|
js/main.js
CHANGED
@@ -19,7 +19,7 @@ let nodeTypes = {
|
|
19 |
|
20 |
// Initialize when document is ready
|
21 |
$(document).ready(function() {
|
22 |
-
console.log("Document ready, initializing Daily
|
23 |
|
24 |
// Initialize attribute pane
|
25 |
$('#attributepane').css('display', 'none');
|
@@ -28,9 +28,10 @@ $(document).ready(function() {
|
|
28 |
$.getJSON('config.json', function(data) {
|
29 |
console.log("Configuration loaded:", data);
|
30 |
config = data;
|
31 |
-
document.title = config.text.title || 'Daily
|
32 |
-
$('#title').text(config.text.title || 'Daily
|
33 |
-
|
|
|
34 |
|
35 |
// Update the path to load data from the data folder
|
36 |
if (config.data && !config.data.startsWith('data/')) {
|
|
|
19 |
|
20 |
// Initialize when document is ready
|
21 |
$(document).ready(function() {
|
22 |
+
console.log("Document ready, initializing 🤗 Daily Papers Atlas");
|
23 |
|
24 |
// Initialize attribute pane
|
25 |
$('#attributepane').css('display', 'none');
|
|
|
28 |
$.getJSON('config.json', function(data) {
|
29 |
console.log("Configuration loaded:", data);
|
30 |
config = data;
|
31 |
+
document.title = config.text.title || '🤗 Daily Papers Atlas';
|
32 |
+
$('#title').text(config.text.title || '🤗 Daily Papers Atlas');
|
33 |
+
|
34 |
+
// Don't modify the intro text at all - using hardcoded HTML
|
35 |
|
36 |
// Update the path to load data from the data folder
|
37 |
if (config.data && !config.data.startsWith('data/')) {
|
js/paper-atlas.js
CHANGED
@@ -23,8 +23,11 @@ $(document).ready(function() {
|
|
23 |
// Load configuration
|
24 |
$.getJSON('config.json', function(data) {
|
25 |
config = data;
|
26 |
-
document.title = config.title || 'Daily
|
27 |
-
$('#title').text(config.title || 'Daily
|
|
|
|
|
|
|
28 |
loadGraph();
|
29 |
});
|
30 |
|
|
|
23 |
// Load configuration
|
24 |
$.getJSON('config.json', function(data) {
|
25 |
config = data;
|
26 |
+
document.title = config.title || '🤗 Daily Papers Atlas';
|
27 |
+
$('#title').text(config.title || '🤗 Daily Papers Atlas');
|
28 |
+
|
29 |
+
// Don't modify the intro text at all - using hardcoded HTML
|
30 |
+
|
31 |
loadGraph();
|
32 |
});
|
33 |
|