Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,3 +22,50 @@ You can use it from the **web UI** or programmatically via the **API**.
|
|
| 22 |
The Space exposes `/run/predict` for programmatic access.
|
| 23 |
The input order matches the UI fields:
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
The Space exposes `/run/predict` for programmatic access.
|
| 23 |
The input order matches the UI fields:
|
| 24 |
|
| 25 |
+
```
|
| 26 |
+
[ image_url:str | null,
|
| 27 |
+
image_file:path | "file" | null,
|
| 28 |
+
duration:number,
|
| 29 |
+
fps:number,
|
| 30 |
+
base:number,
|
| 31 |
+
glitch2_secs:number,
|
| 32 |
+
wobble_main:number,
|
| 33 |
+
wobble_jitter:number,
|
| 34 |
+
wobble_f1:number,
|
| 35 |
+
wobble_f2:number,
|
| 36 |
+
sigma:number ]
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
### Example (JSON + URL)
|
| 41 |
+
```bash
|
| 42 |
+
curl -X POST \
|
| 43 |
+
-H "Content-Type: application/json" \
|
| 44 |
+
-d '{
|
| 45 |
+
"data": [
|
| 46 |
+
"https://picsum.photos/seed/abc/800/600",
|
| 47 |
+
null,
|
| 48 |
+
5,
|
| 49 |
+
30, 20, 0, 0, 0, 0, 0, 0
|
| 50 |
+
]
|
| 51 |
+
}' \
|
| 52 |
+
https://<your-username>-glitch-video.hf.space/run/predict
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
```
|
| 56 |
+
curl -X POST \
|
| 57 |
+
-F "data=@-;type=application/json" \
|
| 58 |
+
-F "files[]=@/path/to/local_image.jpg" \
|
| 59 |
+
https://<your-username>-glitch-video.hf.space/run/predict <<'JSON'
|
| 60 |
+
{"data": [null, "file", 5, 30, 20, 0, 0, 0, 0, 0, 0]}
|
| 61 |
+
JSON
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
🛠️ Requirements
|
| 66 |
+
|
| 67 |
+
FFmpeg/ffprobe v7 (installed via Dockerfile).
|
| 68 |
+
Python deps: gradio, pillow, glitch-this, requests.
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
|