I have copy and pasted the source code from the sample web app to my local machine to start tweaking it, but I get:
"Error loading response.
Check your API key, model, version,
and other parameters
then try again."
I have checked all the parameters, but I see an outside script referenced at the bottom of the code: <script src="/infer.e52137ed1b27e0a86d5a.js"></script>
I have tried replacing that with what I believe to be the absolute address (if I had permission to run it off server, which may be unlikely): <script src="https://detect.roboflow.com/infer.e52137ed1b27e0a86d5a.js"></script>
I get the same result. Any advice appreciated!
Edit: for reference here is the sample web app I pulled down minus my api key.
Just double checking that by “pulled down” you mean using the code from the codepen linked on the bottom right vs saving the source code from that page which includes some extra boilerplate from our serverside build and analytics: https://codepen.io/roboflow/pen/VwaKXdM
I did it that way the first time then ran into this external request issue and just pulled the source code off the page, but I will go grab that code again now.
Thanks!
hmmm now starting to get that same error on my FTP server: Access to XMLHttpRequest at 'https://infer.roboflow.com/helicopters-of-dc-ghwuq/1?access_token=API_KEY&confidence=0.4&overlap=0.3&format=image&labels=on&stroke=2&image=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FFBL25GUX0AQSVRU.jpg' from origin 'MY_DOMAIN' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Hi @HelicoptersofDC - can you send a copy of the full code you’re using for inference (and the image used for inference) to help@roboflow.com? I’d like to run some tests to diagnose the error.
You can also choose to link the files here if your API key is removed from the inference code.
For now I’m going to rely on file upload - I will work you guys up some code when I have time, was having a similar problem with Python so I’d like to get you some detailed logs.
@abdullahmadawi could you elaborate on what issue are you experiencing? Is it the error message the original poster mentioned about Error loading response. Check your API key, model, version, and other parameters then try again.? Are you trying to run the web app locally?