Spaces:
Runtime error
Runtime error
| 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()) | |