DATN_v1 / app.py
Phong1807's picture
Update app.py
eecadac verified
raw
history blame contribute delete
No virus
379 Bytes
import requests
API_URL = "https://api-inference.huggingface.co/models/Phong1807/whisper-datn11"
headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
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")