-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de29371
commit 6d40303
Showing
20 changed files
with
141 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,8 @@ | |
"isolatedModules": true, | ||
"verbatimModuleSyntax": true, | ||
"skipLibCheck": true | ||
} | ||
}, | ||
"include": [ | ||
"src/**/*.ts" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<h1 align="center">🧑🚀 hfup</h1> | ||
|
||
<p align="center"> | ||
A collection of tools to help you deploy, bundle HuggingFace Spaces and related assets with ease. | ||
</p> | ||
|
||
> Where `hfup` stands for HuggingFace up, and the word `up` was inspired from `rollup`, `tsup`, you may think it means "to make your HuggingFace work up and running". | ||
## Features | ||
|
||
- Still manually writing HuggingFace Spaces configurations? | ||
- Having trouble to quickly handle and edit the `.gitattributes` file for Git LFS? | ||
- Don't want any of the HuggingFace Spaces front-matter appear in `README.md`? | ||
- Fighting against annoying errors when deploying your HuggingFace Spaces? | ||
|
||
`hfup` is here to help you! | ||
|
||
- 🚀 Automatically... | ||
- generate `.gitattributes` file for Git LFS. | ||
- generate HuggingFace Spaces front-matter in `README.md`. | ||
- search for your `README.md` file and merge the front-matter header. | ||
- generate a dedicated `README.md` file right inside the `outDir` of build. | ||
- 🔐 Intellisense ready, type safe for Spaces configurations. | ||
- 📦 Out of the box support for Vite. | ||
|
||
## Installation | ||
|
||
[`pnpm`](https://pnpm.io/) | ||
|
||
```shell | ||
pnpm i hfup -D | ||
``` | ||
|
||
[`@antfu/ni`](https://www.npmjs.com/package/@antfu/ni) | ||
|
||
```shell | ||
ni hfup -D | ||
``` | ||
|
||
`npm` | ||
|
||
```shell | ||
npm i hfup -D | ||
``` | ||
|
||
Yarn | ||
|
||
```shell | ||
yarn i hfup -D | ||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
import { LFS, SpaceCard } from 'hfup/vite' | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
LFS(), | ||
SpaceCard({ | ||
title: 'Real-time Whisper WebGPU (Vue)', | ||
emoji: '🎤', | ||
colorFrom: 'gray', | ||
colorTo: 'green', | ||
sdk: 'static', | ||
pinned: false, | ||
license: 'mit', | ||
models: ['onnx-community/whisper-base'], | ||
short_description: 'Yet another Real-time Whisper with WebGPU, written in Vue', | ||
thumbnail: 'https://raw.githubusercontent.com/moeru-ai/airi/refs/heads/main/packages/whisper-webgpu/public/banner.png' | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
After bundling, a dedicated README with merged front-matter header will be generated in the root of your project: | ||
|
||
```md | ||
--- | ||
title: Real-time Whisper WebGPU (Vue) | ||
emoji: 🎤 | ||
colorFrom: gray | ||
colorTo: green | ||
sdk: static | ||
pinned: false | ||
license: mit | ||
models: | ||
- onnx-community/whisper-base | ||
short_description: Yet another Real-time Whisper with WebGPU, written in Vue | ||
thumbnail: https://raw.githubusercontent.com/moeru-ai/airi/refs/heads/main/packages/whisper-webgpu/public/banner.png | ||
--- | ||
|
||
# Real-time Whisper WebGPU (Vue) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,8 @@ | |
"isolatedModules": true, | ||
"verbatimModuleSyntax": true, | ||
"skipLibCheck": true | ||
} | ||
}, | ||
"include": [ | ||
"src/**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.