How to link Ximiliar app to Thukable

When testing and trying to change things or alter settings the blocks way becomes easier than the string way which you could easily change the wrong part or by mistake remove one of the brackets.

The blocks start with generate JSON from object which effectively converts it to string.

how true!

1 Like

so I found an exact match of what I want to do but I still get an error when I upload a picture


not sure if this person coded everything correctly or if I made a mistake somewhere?

1 Like

What error do you get?

1 Like

When I live test on y phone I get this error

1 Like

First of all this error means you have a logic problem and the app crashes.

Secondly, the block
image
should not work as it will not produce the required format for the API call.

so the generate from json is incorrect or the block underneath(not sure what that block even is)

1 Like

The documentation states that you either provide a URL of the image stored in a server or the Base64 encoded string of the image. Your blocks provides neither of those.

Here is a quick demo of how you can obtain the Base64 encoded string of an image.
https://x.thunkable.com/projectPage/61f68431c3761001dba12df1

1 Like

hmm so my images are stored in a task

and within that task they are separated into categories

simply coping and pasting the url does not work

1 Like

A simple way to test if the URL that you are copying is the intended is to open a new tab in your browser and try to view the image by pasting the URL into your browser. You need to see that this URL can actually show the image.

2 Likes

when I try this it comes up as the url not existing. I tried doing what Tataing did in his video around 2:30 mark, but I think because the Ximilar app makes a person log in I need a different step?

1 Like

Let’s use a URL that we know it works.
Try this http://i.imgur.com/fwxooMv.png and use it to test your blocks in your app.

your screenshots imply that there are 2 services available: ready made recognition and customer recognition - which one are you trying to do? if it’s ready made, the categorization has been done for you (ie. it’s been trained), if custom, you have to categorize the photos yourself in a stand alone training run- have you done it?. it also looks like you are given a task number that you provide when you do your call. do you already have such a number?
the thunkable chunk you posted seems to be for request for reognition/classification,. i’m also unsure if it works now because the ximilar docs seem to require photos to be in base64 form but your thunkable example seems to show passing the file name returned from the media_upload directly to the web_api call without any base64 conversion. you should check again with ximilar if they still allow photos.

1 Like

Im trying to do the custom recognition that I made.
the video that I linked "image classification shows exactly what I want to do and when I input everything that he did mine does not work where his does.

Im pretty much doing essentially the same thing he is doing but I have my own custom categories

what are you trying to formulate? the block for the webapi call? tell us what you want to create (block out the apikey)

Instead of the generate JSON from object..... enter the URL I gave you. This should give you a good start.

I just noticed that you have a wrong Body structure
image

You are using the example URL from the documentation. Instead of the example URL use the one I gave you and then no need to add generate JSON from object....

One last thing:
Have you setup the Media DB correctly?

here’s the curl statement for a classify run for one photo:
curl -H “Content-Type: application/json” -H “authorization: Token API_TOKEN
https://api.ximilar.com/detection/v2/detect -d
‘{“task_id”: “0a8c8186-aee8-47c8-9eaf-348103xa214d”, “records”: [ {"_url": “https://bit.ly/2IymQJv” } ] }’

here’s what i think the web api blocks should look like (NOTE: FOR TWO PHOTOS)

i believe the contents of _url should be the actual url you type in browser to see the image (in this example, you see shortened bit.ly* type of urls)

1 Like

@manyone
You need to remove the text block world from the URL part.

@gsturm3605jl
Use the URL I gave you instead of this bit.ly

1 Like

oops - hello world,goodbye world!

1 Like

@manyone
You need to add the task ID for the task set that was classified. You need to add it to the Body section.