chenguittiMaroua commited on
Commit
668a2f1
·
verified ·
1 Parent(s): 4ef76b6

Update static/test.js

Browse files
Files changed (1) hide show
  1. static/test.js +5 -3
static/test.js CHANGED
@@ -14,9 +14,11 @@ document.addEventListener('DOMContentLoaded', function() {
14
  });
15
 
16
  // API configuration
17
- const API_BASE_URL = window.location.origin;
18
- const API_PREFIX = '/api'; // Match your FastAPI endpoints
19
-
 
 
20
  // Summarize document
21
  document.getElementById('summarize-btn').addEventListener('click', async function() {
22
  const fileInput = document.getElementById('summarize-file');
 
14
  });
15
 
16
  // API configuration
17
+ const API_BASE_URL = window.location.origin;
18
+ const API_PREFIX = '/api';
19
+ ...
20
+ fetch(`${API_BASE_URL}${API_PREFIX}/summarize`, ...)
21
+
22
  // Summarize document
23
  document.getElementById('summarize-btn').addEventListener('click', async function() {
24
  const fileInput = document.getElementById('summarize-file');