Test / README.md
Takimoe's picture
Update README.md
7c775d0
|
Raw History Blame Contribute Delete
372 Bytes
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")