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 web/src/lib/utils.ts from Wellz1000/hermes-2: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/Wellz1000/hermes-2/resolve/main/web/src/lib/utils.ts
- Command line
-
hf download hf://Wellz1000/hermes-2/web/src/lib/utils.ts
-
curl -L -o utils.ts https://huggingface.co/Wellz1000/hermes-2/resolve/main/web/src/lib/utils.ts
1.5 kB
| import { type ClassValue, clsx } from "clsx"; | |
| import { twMerge } from "tailwind-merge"; | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)); | |
| } | |
| /** Mondwest font only — use on layout shells; do not force normal-case here or `text-display` chrome (Segmented, badges) stops uppercasing. */ | |
| export const themedFont = "font-mondwest"; | |
| /** Mondwest body copy — sentence-case themed text (not uppercase chrome). */ | |
| export const themedBody = "font-mondwest normal-case"; | |
| /** Mondwest brand chrome — uppercase section headers and nav labels. */ | |
| export const themedChrome = "font-mondwest text-display"; | |
| /** Relative time from a Unix epoch timestamp (seconds). */ | |
| export function timeAgo(ts: number): string { | |
| const delta = Date.now() / 1000 - ts; | |
| if (delta < 60) return "just now"; | |
| if (delta < 3600) return `${Math.floor(delta / 60)}m ago`; | |
| if (delta < 86400) return `${Math.floor(delta / 3600)}h ago`; | |
| if (delta < 172800) return "yesterday"; | |
| return `${Math.floor(delta / 86400)}d ago`; | |
| } | |
| /** Relative time from an ISO-8601 timestamp string. */ | |
| export function isoTimeAgo(iso: string): string { | |
| const delta = (Date.now() - new Date(iso).getTime()) / 1000; | |
| if (delta < 0 || Number.isNaN(delta)) return "unknown"; | |
| if (delta < 60) return "just now"; | |
| if (delta < 3600) return `${Math.floor(delta / 60)}m ago`; | |
| if (delta < 86400) return `${Math.floor(delta / 3600)}h ago`; | |
| return `${Math.floor(delta / 86400)}d ago`; | |
| } | |