import requests

API_URL = "https://api-inference.huggingface.co/models/chompk/wav2vec2-large-xlsr-thai-tokenized"
headers = {"Authorization": f"Bearer {API_TOKEN}"}

def query(filename):
    with open(filename, "rb") as f:
        data = f.read()
    response = requests.post(API_URL, headers=headers, data=data)
    return response.json()

output = query("sample1.flac")
{}
region:us
TAGS
#region-us 

import requests

API_URL = "URL
headers = {"Authorization": f"Bearer {API_TOKEN}"}

def query(filename):
    with open(filename, "rb") as f:
        data = f.read()
    response = URL(API_URL, headers=headers, data=data)
    return URL()

output = query("URL")
TAGS
#region-us 

TAGS
#region-us 
