Client Js Failed to fetch file (gradio api)

Im Using Gradio Api on react web app and when i fetch some data and file it responds with failed to fetch
(im new please let me know if you need anything)

      const response_0 = await fetch(fileLocation);
      const exampleFile = await response_0.blob();
      const client = await Client.connect("http://127.0.0.1:7860/");
      const result = await client.predict("/predict", {
        input_text: notesText,
        sum_style: sumStyle,
        sum_length: sumLen,
        op: sumFile,
        location: exampleFile,
1 Like

I don’t know much JavaScript, but let’s follow the sample first. Also, you may be able to fix the port problem by changing README.md.