Barnabiii commited on
Commit
69b0464
β€’
1 Parent(s): 2139cb3

automatization of the page

Browse files
Files changed (3) hide show
  1. ai_models.html +78 -107
  2. modelData.js +22 -0
  3. style.css +2 -5
ai_models.html CHANGED
@@ -35,89 +35,25 @@
35
  <h1 class="mb-4 mt-4">AI models</h1>
36
 
37
  <section class="mt-4">
38
- <div style="display: flex;">
39
- <table class="mt-4 ml-5" >
 
40
  <tr class="header">
41
  <th colspan="2">Segmentation models</th>
42
  </tr>
43
  <tr class="header">
44
- <th>Location</th>
45
  <th>Architectures</th>
46
  </tr>
47
- <tr class="clickable" data-href="#">
48
- <td>H&N nodes</td>
49
- <td>nnUNetv2</td>
50
- </tr>
51
- <tr class="clickable" data-href="#">
52
- <td>H&N OAR</td>
53
- <td>nnUNetv2</td>
54
- </tr>
55
- <tr>
56
- <td>Prostate OAR</td>
57
- <td>nnUNetv2</td>
58
- </tr class="clickable" data-href="#">
59
- <tr class="clickable" data-href="#">
60
- <td>Breast OAR</td>
61
- <td>nnUNetv2</td>
62
- </tr>
63
- <tr class="clickable" data-href="#">
64
- <td>Brain OAR</td>
65
- <td>nnUNetv2</td>
66
- </tr>
67
- <tr class="clickable" data-href="#">
68
- <td>Brain Tumor</td>
69
- <td>SwinUNETR</td>
70
- </tr>
71
- <tr class="clickable" data-href="#">
72
- <td>Esophagus OAR</td>
73
- <td>nnUNetv2</td>
74
- </tr>
75
- <tr class="clickable" data-href="#swinBs">
76
- <td>Body</td>
77
- <td>SwinUNETR</td>
78
- <td class="invisible">link</td>
79
- </tr>
80
  </table>
81
- <table class="mt-4 ml-5">
82
  <tr class="header">
83
  <th colspan="2">Dose prediction models</th>
84
  </tr>
85
  <tr class="header">
86
- <th>Location</th>
87
  <th>Architectures</th>
88
  </tr>
89
- <tr class="clickable" data-href="#hanPBS">
90
- <td>H&N PBS</td>
91
- <td>HDUNet</td>
92
- </tr>
93
- <tr class="clickable" data-href="#hanVMAT">
94
- <td>H&N VMAT</td>
95
- <td>HDUNet</td>
96
- </tr>
97
- <tr class="clickable" data-href="#h">
98
- <td>Prostate IMRT</td>
99
- <td>HDUNet</td>
100
- </tr>
101
- <tr class="clickable" data-href="#">
102
- <td>Breast PT</td>
103
- <td>HDUNet</td>
104
- </tr>
105
- <tr class="clickable" data-href="#">
106
- <td>Esophagus PT</td>
107
- <td>HDUNet</td>
108
- </tr>
109
- <tr class="clickable" data-href="#">
110
- <td>Esophagus IMRT</td>
111
- <td>HDUNet</td>
112
- </tr>
113
- <tr>
114
- <td> β€Ž </td>
115
- <td> β€Ž </td>
116
- </tr>
117
- <tr>
118
- <td> β€Ž </td>
119
- <td> β€Ž </td>
120
- </tr>
121
  </table>
122
  </div>
123
  </section>
@@ -125,17 +61,12 @@
125
  <section>
126
  <h2>Details</h2>
127
  <section class="mt-4" id="dose-prediction">
128
- <h3>Segmentation models</h3>
129
- <div class="row" style="border: 5px solid rgb(189, 190, 191)">
130
- <div id="swinBs" style="padding:50px"></div>
131
- </div>
132
  <h3>Dose prediction models</h3>
133
- <div class="row" style="border: 5px solid rgb(189, 190, 191)">
134
- <div id="hanPBS" style="padding:50px"></div>
135
- </div>
136
- <div class="row" style="border: 5px solid rgb(189, 190, 191)">
137
- <div id="hanVMAT" style="padding:50px"></div>
138
- </div>
139
  </section>
140
  </section>
141
 
@@ -147,50 +78,90 @@
147
  </div>
148
 
149
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
150
-
151
  <script>
152
- $(".clickable").click(function(){
153
- window.location = $(this).data("href");
154
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
- $(document).ready(function () {
157
- var models = [
158
- ['https://huggingface.co/AI4MIRO/SwinUNETR_body_segmentation/raw/main/README.md','#swinBs'],
159
- ['https://huggingface.co/AI4MIRO/Dose_prediction_han_vmat/raw/main/README.md','#hanVMAT'],
160
- ['https://huggingface.co/AI4MIRO/Dose_prediction_han_PBS/raw/main/README.md',"#hanPBS"]
161
- ]
 
 
 
 
162
 
163
- for(let i = 0; i < models.length; i++) {
164
- var apiUrl = models[i][0]
165
- console.log(apiUrl)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
 
167
  $.ajax({
168
  url: apiUrl,
169
  method: 'GET',
170
  success: function (data) {
171
- console.log("models",models[i][1]);
172
- $(models[i][1]).html(marked(data))
173
  },
174
  error: function (error) {
175
  console.error('Error fetching release information:', error);
176
  }
177
  });
178
  }
179
- });
180
-
181
  let mybutton = document.getElementById("topBtn");
182
  window.onscroll = function() {scrollFunction()};
183
 
184
- function scrollFunction() {
185
- console.log(mybutton.id);
186
- if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { mybutton.style.display = "block";}
187
- else { mybutton.style.display = "none";}
188
- }
189
 
190
- function topFunction() {
191
- document.body.scrollTop = 0;
192
- document.documentElement.scrollTop = 0;
193
- }
 
 
 
 
 
194
  </script>
195
  </body>
196
- </html>
 
35
  <h1 class="mb-4 mt-4">AI models</h1>
36
 
37
  <section class="mt-4">
38
+ <div style="display: flex;">
39
+
40
+ <table class="mt-4 ml-5" id="segTable">
41
  <tr class="header">
42
  <th colspan="2">Segmentation models</th>
43
  </tr>
44
  <tr class="header">
45
+ <th>Locations</th>
46
  <th>Architectures</th>
47
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  </table>
49
+ <table class="mt-4 ml-5" id="doseTable">
50
  <tr class="header">
51
  <th colspan="2">Dose prediction models</th>
52
  </tr>
53
  <tr class="header">
54
+ <th>Locations</th>
55
  <th>Architectures</th>
56
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  </table>
58
  </div>
59
  </section>
 
61
  <section>
62
  <h2>Details</h2>
63
  <section class="mt-4" id="dose-prediction">
64
+ <h3>Segmentation models</h3>
65
+ <section id="segCards"></section>
66
+
 
67
  <h3>Dose prediction models</h3>
68
+ <section id="doseCards"></section>
69
+
 
 
 
 
70
  </section>
71
  </section>
72
 
 
78
  </div>
79
 
80
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
81
+ <script src="modelData.js"></script>
82
  <script>
83
+ function scrollFunction() {
84
+ console.log(mybutton.id);
85
+ if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { mybutton.style.display = "block";}
86
+ else { mybutton.style.display = "none";}
87
+ }
88
+
89
+ function topFunction() {
90
+ document.body.scrollTop = 0;
91
+ document.documentElement.scrollTop = 0;
92
+ }
93
+
94
+ function AI_ModelTableCreate(dataSection,id) {
95
+ tbl = document.getElementById(id.concat("Table"));
96
+ N_iterations = Math.max(dataModel.seg.length,dataModel.dose.length);
97
+
98
+ for (let i = 0; i < N_iterations; i++) {
99
+ const tr = tbl.insertRow();
100
+ if (i < dataSection.length) {
101
+ tr.setAttribute("class", "clickable");
102
+ tr.setAttribute('data-href','#'.concat(id.concat(i.toString())))
103
+ for (let j = 0; j < 2; j++) {
104
+ const td = tr.insertCell();
105
 
106
+ if (j === 0) {td.appendChild(document.createTextNode(dataSection[i].location));}
107
+ else {td.appendChild(document.createTextNode(dataSection[i].architecture));}
108
+ }
109
+ }
110
+ else {
111
+ const td = tr.insertCell();
112
+ td.appendChild(document.createTextNode("β€Ž"))
113
+ }
114
+ }
115
+ }
116
 
117
+ function AI_ModelCardsCreate(dataSection,id) {
118
+ renderSection = document.getElementById(id.concat("Cards"));
119
+
120
+ for (let i = 0; i < dataSection.length; i++) {
121
+ canvas = document.createElement('div');
122
+ canvas.setAttribute('class','row')
123
+ canvas.style.border = "5px solid rgb(189, 190, 191)";
124
+
125
+ div = document.createElement('div');
126
+ div.setAttribute('id',id.concat(i.toString()))
127
+ div.style.padding = "50px";
128
+
129
+ canvas.appendChild(div)
130
+ renderSection.appendChild(canvas)
131
+ }
132
+ }
133
+
134
+ function getModelCard(dataSection,id) {
135
+ for(let i = 0; i < dataSection.length; i++) {
136
+ var apiUrl = dataSection[i].url
137
 
138
  $.ajax({
139
  url: apiUrl,
140
  method: 'GET',
141
  success: function (data) {
142
+ $('#'.concat(id.concat(i.toString()))).html(marked(data))
 
143
  },
144
  error: function (error) {
145
  console.error('Error fetching release information:', error);
146
  }
147
  });
148
  }
149
+ }
 
150
  let mybutton = document.getElementById("topBtn");
151
  window.onscroll = function() {scrollFunction()};
152
 
153
+ getModelCard(dataModel.seg,'seg');
154
+ getModelCard(dataModel.dose,'dose');
 
 
 
155
 
156
+ AI_ModelTableCreate(dataModel.seg,'seg');
157
+ AI_ModelTableCreate(dataModel.dose,'dose');
158
+
159
+ AI_ModelCardsCreate(dataModel.seg,'seg');
160
+ AI_ModelCardsCreate(dataModel.dose,'dose');
161
+
162
+ $(".clickable").click(function(){
163
+ window.location = $(this).data("href");
164
+ });
165
  </script>
166
  </body>
167
+ </html>
modelData.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var dataModel = {
2
+ "seg": [
3
+ {
4
+ "location":"Body",
5
+ "architecture":"SwinUNETR",
6
+ "url":"https://huggingface.co/AI4MIRO/SwinUNETR_body_segmentation/raw/main/README.md"
7
+ }
8
+ ],
9
+
10
+ "dose": [
11
+ {
12
+ "location":"H&N PBS",
13
+ "architecture":"HDUNet",
14
+ "url":"https://huggingface.co/AI4MIRO/Dose_prediction_han_PBS/raw/main/README.md"
15
+ },
16
+ {
17
+ "location":"H&N VMAT",
18
+ "architecture":"HDUNet",
19
+ "url":"https://huggingface.co/AI4MIRO/Dose_prediction_han_vmat/raw/main/README.md"
20
+ }
21
+ ]
22
+ }
style.css CHANGED
@@ -33,6 +33,7 @@ tr {
33
 
34
  tr.clickable:hover {
35
  background-color: rgb(180, 180, 180);
 
36
  }
37
 
38
  table {
@@ -65,8 +66,4 @@ table {
65
 
66
  #SwinBs {
67
  scroll-behavior: smooth;
68
- }
69
-
70
- .invisible {
71
- display: none;
72
- }
 
33
 
34
  tr.clickable:hover {
35
  background-color: rgb(180, 180, 180);
36
+ cursor: pointer;
37
  }
38
 
39
  table {
 
66
 
67
  #SwinBs {
68
  scroll-behavior: smooth;
69
+ }