|
Download README.md from Takimoe/Test: direct link, hf CLI and curl.
- Browser
- Download file 372 Bytes
-
https://huggingface.co/Takimoe/Test/resolve/main/README.md
- Command line
-
hf download hf://Takimoe/Test/README.md
-
curl -L -o README.md https://huggingface.co/Takimoe/Test/resolve/main/README.md
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") |