Skip to content

Commit ac1eb29

Browse files
docker-compose 2nd trial
1 parent d35cf69 commit ac1eb29

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

app/js/ai_game.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function getLabelsSync() {
22
const request = new XMLHttpRequest();
3-
request.open('GET', 'http://quickdraw-endpoints:8000/labels', false);
3+
request.open('GET', 'http://localhost:8000/labels', false);
44
request.send(null);
55

66
if (request.status === 200) {
@@ -211,7 +211,7 @@ function callPredictionAPI() {
211211
const imageBlob = extractImage();
212212
const formData = new FormData();
213213
formData.append('file', imageBlob);
214-
fetch('http://quickdraw-endpoints:8000/predict_with_file', {
214+
fetch('http://localhost:8000/predict_with_file', {
215215
method: 'POST',
216216
body: formData
217217
})

app/js/clock_game.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const difficulty = new URLSearchParams(window.location.search).get('difficulty')
1818

1919
function getLabelsSync() {
2020
const request = new XMLHttpRequest();
21-
request.open('GET', 'http://quickdraw-endpoints:8000/labels', false);
21+
request.open('GET', 'http://localhost:8000/labels', false);
2222
request.send(null);
2323

2424
if (request.status === 200) {
@@ -154,7 +154,7 @@ function callPredictionAPI() {
154154
const imageBlob = extractImage();
155155
const formData = new FormData();
156156
formData.append('file', imageBlob);
157-
fetch('http://quickdraw-endpoints:8000/predict_with_file', {
157+
fetch('http://localhost:8000/predict_with_file', {
158158
method: 'POST',
159159
body: formData
160160
})

app/js/end_game.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', () => {
2727
console.log('data to be sent:');
2828
console.log(JSON.stringify(postData));
2929

30-
fetch('http://quickdraw-endpoints:8000/add_score', {
30+
fetch('http://localhost:8000/add_score', {
3131
method: 'POST',
3232
headers: {
3333
'Content-Type': 'application/json'
@@ -42,7 +42,7 @@ document.addEventListener('DOMContentLoaded', () => {
4242
console.error('Error:', error);
4343
});
4444

45-
fetch(`http://quickdraw-endpoints:8000/scores?mode=${mode}&difficulty=${difficulty}`)
45+
fetch(`http://localhost:8000/scores?mode=${mode}&difficulty=${difficulty}`)
4646
.then(response => response.json())
4747
.then(data => {
4848
console.log('Podium data:', data);

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ services:
88
- "8000:8000"
99
networks:
1010
- quickdraw-network
11+
command: ["/app/endpoints/entrypoint.sh", "--device", "cpu"]
1112

1213
quickdraw:
1314
image: ghcr.io/mlengineershub/quickdraw:latest

0 commit comments

Comments
 (0)