├── .gitignore ├── icon.png ├── ollama.png ├── _ENVIRONMENT ├── README.md ├── reset.js ├── link.js ├── update.js ├── start.js ├── install.js ├── pinokio_meta.json └── pinokio.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinokiofactory/ai-video-composer/HEAD/icon.png -------------------------------------------------------------------------------- /ollama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinokiofactory/ai-video-composer/HEAD/ollama.png -------------------------------------------------------------------------------- /_ENVIRONMENT: -------------------------------------------------------------------------------- 1 | BASE_URL=http://localhost:11434/v1 2 | OPENAI_API_KEY=ollama 3 | MODEL=qwen2.5-coder:32b-instruct-q4_0 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ai-video-composer 2 | 3 | A pinokio script for https://huggingface.co/spaces/huggingface-projects/ai-video-composer 4 | -------------------------------------------------------------------------------- /reset.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | run: [{ 3 | method: "fs.rm", 4 | params: { 5 | path: "app" 6 | } 7 | }] 8 | } 9 | -------------------------------------------------------------------------------- /link.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | run: [ 3 | { 4 | method: "fs.link", 5 | params: { 6 | venv: "app/env" 7 | } 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /update.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | run: [{ 3 | method: "shell.run", 4 | params: { 5 | message: "git pull" 6 | } 7 | }, { 8 | method: "shell.run", 9 | params: { 10 | path: "app", 11 | message: "git pull" 12 | } 13 | }] 14 | } 15 | -------------------------------------------------------------------------------- /start.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | requires: { 3 | bundle: "ai", 4 | }, 5 | daemon: true, 6 | run: [ 7 | { 8 | method: "shell.run", 9 | params: { 10 | venv: "env", 11 | path: "app", 12 | message: [ 13 | "python app.py", 14 | ], 15 | on: [{ 16 | "event": "/http:\/\/\\S+/", 17 | "done": true 18 | }] 19 | } 20 | }, 21 | { 22 | method: "local.set", 23 | params: { 24 | url: "{{input.event[0]}}" 25 | } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /install.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | requires: { 3 | bundle: "ai" 4 | }, 5 | run: [ 6 | { 7 | method: "shell.run", 8 | params: { 9 | message: [ 10 | "git clone https://huggingface.co/spaces/cocktailpeanut/ai-video-composer app", 11 | ] 12 | } 13 | }, 14 | { 15 | method: "shell.run", 16 | params: { 17 | venv: "env", 18 | path: "app", 19 | message: [ 20 | "uv pip install -r requirements.txt", 21 | "uv pip install pydantic==2.10.6 huggingface_hub==0.36" 22 | ] 23 | } 24 | }, 25 | { 26 | method: "shell.run", 27 | params: { 28 | message: "ollama pull {{env.MODEL}}" 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /pinokio_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "posts": [ 3 | "https://x.com/jimmygunawanapp/status/1861591049178882181", 4 | "https://x.com/cocktailpeanut/status/1861564741572825589", 5 | "https://x.com/cocktailpeanut/status/1861560703376634364", 6 | "https://x.com/cocktailpeanut/status/1861557600350831063", 7 | "https://x.com/cocktailpeanut/status/1861518841886511126" 8 | ], 9 | "links": [{ 10 | "title": "cocktailpeanut (wrote the launcher)", 11 | "links": [{ 12 | "type": "bitcoin", 13 | "value": "bc1qx90z3ce9qz4p2pnt06gd0ytntl86qw4d6qv39k" 14 | }, { 15 | "title": "X", 16 | "value": "https://x.com/cocktailpeanut" 17 | }, { 18 | "title": "Github", 19 | "value": "https://github.com/cocktailpeanut" 20 | }, { 21 | "title": "Discord", 22 | "value": "https://discord.gg/TQdNwadtE4" 23 | }] 24 | }] 25 | } 26 | -------------------------------------------------------------------------------- /pinokio.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = { 3 | version: "3.7", 4 | title: "ai-video-composer", 5 | description: "The ultimate video editor powered by natural language and FFMPEG https://huggingface.co/spaces/huggingface-projects/ai-video-composer", 6 | icon: "icon.png", 7 | pre: [{ 8 | icon: "ollama.png", 9 | title: "Ollama", 10 | description: "Get up and running with large language models.", 11 | href: "https://ollama.com/" 12 | }], 13 | menu: async (kernel, info) => { 14 | let installed = info.exists("app/env") 15 | let running = { 16 | install: info.running("install.js"), 17 | start: info.running("start.js"), 18 | update: info.running("update.js"), 19 | reset: info.running("reset.js"), 20 | link: info.running("link.js") 21 | } 22 | if (running.install) { 23 | return [{ 24 | default: true, 25 | icon: "fa-solid fa-plug", 26 | text: "Installing", 27 | href: "install.js", 28 | }] 29 | } else if (installed) { 30 | if (running.start) { 31 | let local = info.local("start.js") 32 | if (local && local.url) { 33 | return [{ 34 | default: true, 35 | icon: "fa-solid fa-rocket", 36 | text: "Open Web UI", 37 | href: local.url, 38 | }, { 39 | icon: 'fa-solid fa-terminal', 40 | text: "Terminal", 41 | href: "start.js", 42 | }] 43 | } else { 44 | return [{ 45 | default: true, 46 | icon: 'fa-solid fa-terminal', 47 | text: "Terminal", 48 | href: "start.js", 49 | }] 50 | } 51 | } else if (running.update) { 52 | return [{ 53 | default: true, 54 | icon: 'fa-solid fa-terminal', 55 | text: "Updating", 56 | href: "update.js", 57 | }] 58 | } else if (running.reset) { 59 | return [{ 60 | default: true, 61 | icon: 'fa-solid fa-terminal', 62 | text: "Resetting", 63 | href: "reset.js", 64 | }] 65 | } else if (running.link) { 66 | return [{ 67 | default: true, 68 | icon: 'fa-solid fa-terminal', 69 | text: "Deduplicating", 70 | href: "link.js", 71 | }] 72 | } else { 73 | return [{ 74 | default: true, 75 | icon: "fa-solid fa-power-off", 76 | text: "Start", 77 | href: "start.js", 78 | }, { 79 | icon: "fa-solid fa-plug", 80 | text: "Update", 81 | href: "update.js", 82 | }, { 83 | icon: "fa-solid fa-plug", 84 | text: "Install", 85 | href: "install.js", 86 | }, { 87 | icon: "fa-solid fa-file-zipper", 88 | text: "
Save Disk Space
Deduplicates redundant library files
", 89 | href: "link.js", 90 | }, { 91 | icon: "fa-regular fa-circle-xmark", 92 | text: "
Reset
Revert to pre-install state
", 93 | href: "reset.js", 94 | confirm: "Are you sure you wish to reset the app?" 95 | }] 96 | } 97 | } else { 98 | return [{ 99 | default: true, 100 | icon: "fa-solid fa-plug", 101 | text: "Install", 102 | href: "install.js", 103 | }] 104 | } 105 | } 106 | } 107 | --------------------------------------------------------------------------------