Send Classification Result to Own Database

Question/Issue:
How to send classification results to my own database?
Project ID:
90804
Context/Use case:
Hi. I am working on a project for a voice classification task. and I want to send the classification results to the local database that I have created. I am using Raspberry Pi and Linux SDK,
I tried sending dummy data and it worked. but when implemented with the source code on the Linux SDK it failed. I include the code for sending dummy data to the database.

import requests
import time

urlget = "http://192.168.1.5/index.php/raspi/getinsert"
urlpost = "http://192.168.1.5/index.php/raspi/postinsert"

while True:
    try:
        tesget = "Class A"
        tespost = "Class B"

        send = requests.get(urlget, params={"data":tesget})
        #send = requests.post(urlpost, data={"data":tespost})

        print(send.text)
    except:
        print("error")
    time.sleep(10)

the display of the database that I created with dummy data.

Which part of the code do I need to pay attention to, so that I can send the classification result using RPi4 with LINUX SDK to my Db?

Regards,

Hello @dexvils,

You should call your function in this for loop:

for res, audio in runner.classifier(device_id=selected_device_id):
                print('Result (%d ms.) ' % (res['timing']['dsp'] + res['timing']['classification']), end='')
                for label in labels:
                    score = res['result']['classification'][label]
                    print('%s: %.2f\t' % (label, score), end='')
                print('', flush=True)

Implement something like:

for label in labels:
   if (res['result']['classification'][value] > 0.8):
      send_inference(res['result']['classification'][label])

Best,

Louis