eduardmtz commited on
Commit
a0d2969
·
verified ·
1 Parent(s): 08c75fb

Update preguntar-pdf.html

Browse files
Files changed (1) hide show
  1. preguntar-pdf.html +4 -6
preguntar-pdf.html CHANGED
@@ -8,9 +8,6 @@
8
  </head>
9
  <body>
10
  <h1>Ask Questions to the Model</h1>
11
- <a href="entrenament-pdf.html" style="margin:5px;padding: 5px; border:1px solid green">Entrenament PDF</a>
12
- <a href="preguntar-pdf.html" style="margin:5px;padding: 5px; border:1px solid green">Preguntar PDF</a>
13
- <br><br>
14
  <input type="text" id="question" placeholder="Type your question here">
15
  <button id="askQuestion">Ask</button>
16
 
@@ -19,9 +16,9 @@
19
  <script>
20
  async function loadModel() {
21
  try {
22
- console.log('Checking available models in local storage:', Object.keys(localStorage));
23
- const model = await tf.loadLayersModel('localstorage://pdf-trained-model');
24
- console.log('Model loaded successfully.');
25
  return model;
26
  } catch (err) {
27
  document.getElementById('response').textContent = 'Model not found. Train it first!';
@@ -86,3 +83,4 @@
86
  </body>
87
  </html>
88
 
 
 
8
  </head>
9
  <body>
10
  <h1>Ask Questions to the Model</h1>
 
 
 
11
  <input type="text" id="question" placeholder="Type your question here">
12
  <button id="askQuestion">Ask</button>
13
 
 
16
  <script>
17
  async function loadModel() {
18
  try {
19
+ console.log('Checking available models in IndexedDB...');
20
+ const model = await tf.loadLayersModel('indexeddb://pdf-trained-model');
21
+ console.log('Model loaded successfully from IndexedDB.');
22
  return model;
23
  } catch (err) {
24
  document.getElementById('response').textContent = 'Model not found. Train it first!';
 
83
  </body>
84
  </html>
85
 
86
+