Spaces:
Running
Running
Update index.mjs
Browse files
index.mjs
CHANGED
@@ -29,8 +29,8 @@ async function asyncAPICall(data, socket) {
|
|
29 |
const grapi = await Client.connect("fffiloni/mndrm-call");
|
30 |
try{
|
31 |
const api_result = await grapi.predict("/infer", {
|
32 |
-
data[0], // blob in 'image' Image component
|
33 |
-
data[1], // string in 'Question' Textbox component
|
34 |
});
|
35 |
console.log(api_result)
|
36 |
socket.emit("api_response", (api_result.data))
|
|
|
29 |
const grapi = await Client.connect("fffiloni/mndrm-call");
|
30 |
try{
|
31 |
const api_result = await grapi.predict("/infer", {
|
32 |
+
image_string: data[0], // blob in 'image' Image component
|
33 |
+
question: data[1], // string in 'Question' Textbox component
|
34 |
});
|
35 |
console.log(api_result)
|
36 |
socket.emit("api_response", (api_result.data))
|