Views
No views yet
1import requests
2import json
3import base64
4
5API_URL = "https://YOUR-ENDPOINT-URL.endpoints.huggingface.cloud"
6headers = {
7 "Authorization": "Bearer YOUR_HF_TOKEN",
8 "Content-Type": "application/json"
9}
10
11# Text-to-video generation
12data = {
13 "inputs": {
14 "prompt": "A person giving a presentation"
15 },
16 "parameters": {
17 "num_frames": 16,
18 "height": 480,
19 "width": 640,
20 "num_inference_steps": 25,
21 "guidance_scale": 7.5
22 }
23}
24
25response = requests.post(API_URL, headers=headers, json=data)
26result = response.json()