Spaces:
Runtime error
Runtime error
File size: 445 Bytes
9f83ce9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import requests
url = 'https://<your-hf-space-url>.hf.space/inference' # URL thực tế sau khi deploy lên HF
video_path = '/path/to/your_video.mp4'
params = {
'model_name': 'spoter',
'output_option': 'all',
'output_dir': 'custom_output_folder' # người dùng có thể chọn folder output
}
files = {
'file': open(video_path, 'rb')
}
response = requests.post(url=url, files=files, params=params)
print(response.json())
|