kowalsky commited on
Commit
8088059
·
1 Parent(s): 830d345
Files changed (1) hide show
  1. templates/index.html +6 -6
templates/index.html CHANGED
@@ -158,8 +158,8 @@
158
  }
159
  };
160
 
161
- // const response = await fetch(`${window.location.origin}/start_detection`, {
162
- const response = await fetch(`http://localhost:7860/start_detection`, {
163
  method: 'POST',
164
  });
165
 
@@ -170,8 +170,8 @@
170
  const result = await response.json();
171
  logMessage(`Status: ${result.status}`, 'info');
172
 
173
- // websocket = new WebSocket(`wss://${window.location.host}/ws`);
174
- websocket = new WebSocket(`ws://localhost:7860/ws`);
175
  websocket.onmessage = async function(event) {
176
  const data = event.data;
177
  if (data === 'global-fake') {
@@ -245,8 +245,8 @@
245
  formData.append('file', file);
246
 
247
  try {
248
- // const response = await fetch(`${window.location.origin}/upload_audio/`, {
249
- const response = await fetch(`http://localhost:7860/upload_audio/`, {
250
  method: 'POST',
251
  body: formData,
252
  });
 
158
  }
159
  };
160
 
161
+ const response = await fetch(`${window.location.origin}/start_detection`, {
162
+ // const response = await fetch(`http://localhost:7860/start_detection`, {
163
  method: 'POST',
164
  });
165
 
 
170
  const result = await response.json();
171
  logMessage(`Status: ${result.status}`, 'info');
172
 
173
+ websocket = new WebSocket(`wss://${window.location.host}/ws`);
174
+ // websocket = new WebSocket(`ws://localhost:7860/ws`);
175
  websocket.onmessage = async function(event) {
176
  const data = event.data;
177
  if (data === 'global-fake') {
 
245
  formData.append('file', file);
246
 
247
  try {
248
+ const response = await fetch(`${window.location.origin}/upload_audio/`, {
249
+ // const response = await fetch(`http://localhost:7860/upload_audio/`, {
250
  method: 'POST',
251
  body: formData,
252
  });