hf-chat
hf-chat copied to clipboard
hf-chat
hf-chat
leverages huggingface/chat-ui
and huggingface/candle
to create native and efficient chat apps for macOS and iOS. It uses tauri as the cross-platform middleware.
This is Microsoft Phi 1.5, unquantized, running locally on iPhone 15 Pro Max using Metal Performance Shaders (MPS) for acceleration:
Build for iOS
-
Please, make sure you have Xcode installed with support for iOS development.
-
Install dependencies and the
cargo tauri
CLI.
$ pnpm install
$ cargo install tauri-cli --version=2.0.0-alpha.20
- Change the app identifier and development team in
src-tauri/tauri.conf.json
. These are the default values that you'll need to replace:
"identifier": "co.huggingface.hfchat",
"iOS": {
"developmentTeam": "2EADP68M95"
},
You can create an app identifier from Apple's developer site visiting this link. To find your development team ID, select "Membership details" after you log in to the developer site.
- Generate the Xcode project files.
$ cargo tauri ios init
This will place the auto-generated files in src-tauri/gen/
.
- Run on device or a simulator. If you have an iPhone attached, it should be automatically detected. Otherwise, you'll be shown a menu to select an iOS simulator among the ones installed in your system.
cargo tauri ios dev
- To generate an IPA archive suitable for deployment, replace the last command with:
cargo tauri ios build