Instructions to use Wellz1000/hermes-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- HERMES
How to use Wellz1000/hermes-2 with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download apps/desktop/scripts/run-electron-builder.mjs from Wellz1000/hermes-2: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/Wellz1000/hermes-2/resolve/main/apps/desktop/scripts/run-electron-builder.mjs
- Command line
-
hf download hf://Wellz1000/hermes-2/apps/desktop/scripts/run-electron-builder.mjs
-
curl -L -o run-electron-builder.mjs https://huggingface.co/Wellz1000/hermes-2/resolve/main/apps/desktop/scripts/run-electron-builder.mjs
1.96 kB
| // Resolve electronDist at runtime (#38673, #47917): electron-builder 26.8.x can | |
| // re-unpack a broken Electron.app; reusing the installed dist dodges that. | |
| // npm workspace hoisting is non-deterministic — require.resolve finds electron | |
| // wherever it landed. Dist present → -c.electronDist=<abs>/dist; absent → let | |
| // electron-builder fetch via @electron/get (electronVersion + ELECTRON_MIRROR). | |
| import fs from "node:fs" | |
| import path from "node:path" | |
| import { spawnSync } from "node:child_process" | |
| import { createRequire } from "node:module" | |
| const require = createRequire(import.meta.url) | |
| function electronDistDir() { | |
| try { | |
| return path.join(path.dirname(require.resolve("electron/package.json")), "dist") | |
| } catch { | |
| return null | |
| } | |
| } | |
| function distBinary(dist) { | |
| if (process.platform === "darwin") { | |
| return path.join(dist, "Electron.app", "Contents", "MacOS", "Electron") | |
| } | |
| if (process.platform === "win32") { | |
| return path.join(dist, "electron.exe") | |
| } | |
| return path.join(dist, "electron") | |
| } | |
| function electronBuilderCli() { | |
| const pkgJson = require.resolve("electron-builder/package.json") | |
| const bin = require(pkgJson).bin | |
| const rel = typeof bin === "string" ? bin : bin["electron-builder"] | |
| return path.join(path.dirname(pkgJson), rel) | |
| } | |
| const dist = electronDistDir() | |
| const args = [] | |
| if (dist && fs.existsSync(distBinary(dist))) { | |
| args.push(`-c.electronDist=${dist}`) | |
| } else { | |
| console.warn( | |
| "[run-electron-builder] no local electron dist; electron-builder will fetch " + | |
| "via @electron/get (electronVersion + ELECTRON_MIRROR)." | |
| ) | |
| } | |
| args.push(...process.argv.slice(2)) | |
| const result = spawnSync(process.execPath, [electronBuilderCli(), ...args], { | |
| stdio: "inherit", | |
| }) | |
| if (result.error) { | |
| console.error(`[run-electron-builder] spawn failed: ${result.error.message}`) | |
| process.exit(1) | |
| } | |
| process.exit(result.status == null ? 1 : result.status) | |