acharyaaditya26 commited on
Commit
555f91b
1 Parent(s): da60b63

Update templates/result.html

Browse files
Files changed (1) hide show
  1. templates/result.html +9 -4
templates/result.html CHANGED
@@ -21,17 +21,22 @@
21
  resultsContainer.appendChild(pageDiv);
22
  });
23
 
24
- results.forEach(result => {
 
25
  const contentDiv = document.getElementById(`result-content-${result.page_number}`);
26
  const loadingDiv = document.getElementById(`loading-indicator-${result.page_number}`);
27
- loadingDiv.style.display = 'none';
28
- contentDiv.style.display = 'block';
 
 
 
 
29
  });
30
  });
31
  </script>
32
  </head>
33
  <body>
34
  <h1>OCR Results</h1>
35
- <div id="results-container"></div>
36
  </body>
37
  </html>
 
21
  resultsContainer.appendChild(pageDiv);
22
  });
23
 
24
+ // Simulate loading for each page
25
+ results.forEach((result, index) => {
26
  const contentDiv = document.getElementById(`result-content-${result.page_number}`);
27
  const loadingDiv = document.getElementById(`loading-indicator-${result.page_number}`);
28
+
29
+ // Simulate a delay to mimic loading
30
+ setTimeout(() => {
31
+ loadingDiv.style.display = 'none';
32
+ contentDiv.style.display = 'block';
33
+ }, index * 2000); // Adjust the delay as needed
34
  });
35
  });
36
  </script>
37
  </head>
38
  <body>
39
  <h1>OCR Results</h1>
40
+ <div id="results-container" class="scrollable-results"></div>
41
  </body>
42
  </html>