fffiloni commited on
Commit
5f31192
1 Parent(s): 4fedb7c

Update index.mjs

Browse files
Files changed (1) hide show
  1. index.mjs +2 -2
index.mjs CHANGED
@@ -2,7 +2,7 @@ import express from "express";
2
  import 'dotenv/config.js'
3
  import { createServer } from "http";
4
  import { Server } from "socket.io";
5
- import { Client } from "@gradio/client";
6
  import { createRequire } from 'node:module'
7
  const require = createRequire(import.meta.url);
8
  global.EventSource = require('eventsource');
@@ -26,7 +26,7 @@ io.on("connection", (socket) => {
26
 
27
  async function asyncAPICall(data, socket) {
28
 
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
 
2
  import 'dotenv/config.js'
3
  import { createServer } from "http";
4
  import { Server } from "socket.io";
5
+ import { client } from "@gradio/client";
6
  import { createRequire } from 'node:module'
7
  const require = createRequire(import.meta.url);
8
  global.EventSource = require('eventsource');
 
26
 
27
  async function asyncAPICall(data, socket) {
28
 
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